Browse Source

fix flow

master
Gaëtan Renaudeau 7 years ago
parent
commit
c3c03bf568
  1. 2
      src/components/base/Ellipsis.js

2
src/components/base/Ellipsis.js

@ -7,7 +7,7 @@ import Text from 'components/base/Text'
const outerStyle = { width: 0 } const outerStyle = { width: 0 }
const innerStyle = { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } const innerStyle = { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }
export default ({ children, canSelect, ...p }: { children: any, canSelect: * }) => ( export default ({ children, canSelect, ...p }: { children: any, canSelect?: boolean }) => (
<Box grow horizontal> <Box grow horizontal>
<Box grow {...p} style={outerStyle}> <Box grow {...p} style={outerStyle}>
<Text style={{ ...innerStyle, userSelect: canSelect ? 'text' : 'none' }}>{children}</Text> <Text style={{ ...innerStyle, userSelect: canSelect ? 'text' : 'none' }}>{children}</Text>

Loading…
Cancel
Save