|
@ -20,6 +20,7 @@ type Props = { |
|
|
bg?: string, |
|
|
bg?: string, |
|
|
flatLeft?: boolean, |
|
|
flatLeft?: boolean, |
|
|
flatRight?: boolean, |
|
|
flatRight?: boolean, |
|
|
|
|
|
fakeFocusRight?: boolean, |
|
|
fuseOptions?: Object, |
|
|
fuseOptions?: Object, |
|
|
highlight?: boolean, |
|
|
highlight?: boolean, |
|
|
items: Array<any>, |
|
|
items: Array<any>, |
|
@ -57,8 +58,20 @@ const TriggerBtn = styled(Box).attrs({ |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
&:focus { |
|
|
&:focus { |
|
|
outline: none; |
|
|
outline: none; |
|
|
|
|
|
border-color: ${p => p.theme.colors.wallet}; |
|
|
box-shadow: rgba(0, 0, 0, 0.05) 0 2px 2px; |
|
|
box-shadow: rgba(0, 0, 0, 0.05) 0 2px 2px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
${p => { |
|
|
|
|
|
const c = p.theme.colors.wallet |
|
|
|
|
|
return p.fakeFocusRight |
|
|
|
|
|
? ` |
|
|
|
|
|
border-top: 1px solid ${c}; |
|
|
|
|
|
border-right: 1px solid ${c}; |
|
|
|
|
|
border-bottom: 1px solid ${c}; |
|
|
|
|
|
` |
|
|
|
|
|
: '' |
|
|
|
|
|
}}; |
|
|
` |
|
|
` |
|
|
|
|
|
|
|
|
const Item = styled(Box).attrs({ |
|
|
const Item = styled(Box).attrs({ |
|
@ -128,6 +141,7 @@ class Select extends PureComponent<Props> { |
|
|
bg: undefined, |
|
|
bg: undefined, |
|
|
flatLeft: false, |
|
|
flatLeft: false, |
|
|
flatRight: false, |
|
|
flatRight: false, |
|
|
|
|
|
fakeFocusRight: false, |
|
|
itemToString: (item: Object) => item && item.name, |
|
|
itemToString: (item: Object) => item && item.name, |
|
|
keyProp: undefined, |
|
|
keyProp: undefined, |
|
|
maxHeight: 300, |
|
|
maxHeight: 300, |
|
@ -215,6 +229,7 @@ class Select extends PureComponent<Props> { |
|
|
const { |
|
|
const { |
|
|
flatLeft, |
|
|
flatLeft, |
|
|
flatRight, |
|
|
flatRight, |
|
|
|
|
|
fakeFocusRight, |
|
|
items, |
|
|
items, |
|
|
searchable, |
|
|
searchable, |
|
|
itemToString, |
|
|
itemToString, |
|
@ -268,6 +283,7 @@ class Select extends PureComponent<Props> { |
|
|
alignItems="center" |
|
|
alignItems="center" |
|
|
flatLeft={flatLeft} |
|
|
flatLeft={flatLeft} |
|
|
flatRight={flatRight} |
|
|
flatRight={flatRight} |
|
|
|
|
|
fakeFocusRight={fakeFocusRight} |
|
|
flow={2} |
|
|
flow={2} |
|
|
horizontal |
|
|
horizontal |
|
|
tabIndex={0} |
|
|
tabIndex={0} |
|
|