aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/ui
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-07-25 05:44:31 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-07-25 05:44:31 +0800
commit3890f8224d371cecbd5c9d0e3d5c4b54f4381fdb (patch)
treea2d45e6f9e80e58c533a0d0cab025ebe36eb3699 /packages/website/ts/components/ui
parentb9f5c9383067874d2bb87dcc68808d4563f45363 (diff)
downloaddexon-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.tsx3
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';