-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better table layout and bug fixes (#126)
- Loading branch information
Showing
16 changed files
with
1,150 additions
and
862 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import React from "react"; | ||
import { useState } from "react"; | ||
|
||
type ClickableTextProps = { | ||
/** Content to be displayed for the given value. */ | ||
displayValue: string | number | JSX.Element; | ||
ellipsis?: boolean; | ||
onClick: VoidFunction; | ||
}; | ||
|
||
/** Functional component to render clickable text which opens the DataInspector.*/ | ||
export const ClickableText = ({ | ||
displayValue, | ||
ellipsis = false, | ||
onClick, | ||
}: ClickableTextProps) => { | ||
const [isHovering, setHovering] = useState(false); | ||
return ( | ||
<div> | ||
<div | ||
style={{ | ||
cursor: 'pointer', | ||
display: 'inline', | ||
color: ellipsis ? undefined : '#6831c7', | ||
textDecoration: isHovering ? 'underline' : undefined, | ||
}} | ||
onClick={onClick} | ||
onMouseEnter={() => setHovering(true)} | ||
onMouseLeave={() => setHovering(false)} | ||
> | ||
{displayValue} | ||
{ellipsis ? ( | ||
<div | ||
style={{ | ||
display: 'inline', | ||
}} | ||
> | ||
... | ||
</div> | ||
) : null} | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
flipper-plugin-realm/src/components/objectManipulation/types/ListInput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.