diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-07-25 05:44:31 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-07-25 05:44:31 +0800 |
commit | 3890f8224d371cecbd5c9d0e3d5c4b54f4381fdb (patch) | |
tree | a2d45e6f9e80e58c533a0d0cab025ebe36eb3699 /packages/website/ts/components/ui | |
parent | b9f5c9383067874d2bb87dcc68808d4563f45363 (diff) | |
download | dexon-sol-tools-3890f8224d371cecbd5c9d0e3d5c4b54f4381fdb.tar.gz dexon-sol-tools-3890f8224d371cecbd5c9d0e3d5c4b54f4381fdb.tar.zst dexon-sol-tools-3890f8224d371cecbd5c9d0e3d5c4b54f4381fdb.zip |
Fix tooltip wrapping issue in onboardin
Diffstat (limited to 'packages/website/ts/components/ui')
-rw-r--r-- | packages/website/ts/components/ui/text.tsx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/website/ts/components/ui/text.tsx b/packages/website/ts/components/ui/text.tsx index 315f72854..72bee8c0a 100644 --- a/packages/website/ts/components/ui/text.tsx +++ b/packages/website/ts/components/ui/text.tsx @@ -18,6 +18,7 @@ export interface TextProps { textDecorationLine?: string; onClick?: (event: React.MouseEvent<HTMLElement>) => void; hoverColor?: string; + noWrap?: boolean; } const PlainText: React.StatelessComponent<TextProps> = ({ children, className, onClick, Tag }) => ( @@ -37,6 +38,7 @@ export const Text = styled(PlainText)` ${props => (props.minHeight ? `min-height: ${props.minHeight}` : '')}; ${props => (props.onClick ? 'cursor: pointer' : '')}; transition: color 0.5s ease; + ${props => (props.noWrap ? 'white-space: nowrap' : '')}; &:hover { ${props => (props.onClick ? `color: ${props.hoverColor || darken(0.3, props.fontColor)}` : '')}; } @@ -50,6 +52,7 @@ Text.defaultProps = { lineHeight: '1.5em', textDecorationLine: 'none', Tag: 'div', + noWrap: false, }; Text.displayName = 'Text'; |