diff --git a/src/components/SelectCurrency/index.js b/src/components/SelectCurrency/index.js index 47633469..6635f5b6 100644 --- a/src/components/SelectCurrency/index.js +++ b/src/components/SelectCurrency/index.js @@ -33,13 +33,13 @@ const SelectCurrency = ({ onChange, value, t, placeholder, currencies, ...props const options = currencies ? currencies.map(c => ({ ...c, value: c.id, label: c.name })) : [] return ( e.id === exchangeId)} - renderSelected={renderItem} - renderItem={renderItem} - keyProp="id" - items={exchanges} - fontSize={4} + value={options.find(e => e.id === exchangeId)} + options={options} onChange={onChange} + {...props} /> ) : error ? ( Failed to load. ) : ( - - Loading... - + ) } } diff --git a/src/components/SettingsPage/sections/Currencies.js b/src/components/SettingsPage/sections/Currencies.js index c619d309..6fc3f33b 100644 --- a/src/components/SettingsPage/sections/Currencies.js +++ b/src/components/SettingsPage/sections/Currencies.js @@ -114,6 +114,7 @@ class TabCurrencies extends PureComponent { ({ +export default ({ + width, + minWidth, + small, +}: { + width: number, + minWidth: number, + small: boolean, +}) => ({ control: (styles: Object, { isFocused }: Object) => ({ ...styles, width, minWidth, ...ff('Open Sans|SemiBold'), - height: 40, + height: small ? 34 : 40, + minHeight: 'unset', backgroundColor: 'white', cursor: 'pointer', ...(isFocused @@ -60,6 +69,6 @@ export default ({ width, minWidth }: { width: number, minWidth: number }) => ({ }), container: (styles: Object) => ({ ...styles, - fontSize: 13, + fontSize: small ? 12 : 13, }), }) diff --git a/src/components/base/Select/index.js b/src/components/base/Select/index.js index 5b458bd0..910d6a58 100644 --- a/src/components/base/Select/index.js +++ b/src/components/base/Select/index.js @@ -18,11 +18,12 @@ type Props = { renderValue: Option => Node, // optional - placeholder?: string, - isClearable?: boolean, - isDisabled?: boolean, - isLoading?: boolean, - isSearchable?: boolean, + placeholder: string, + isClearable: boolean, + isDisabled: boolean, + isLoading: boolean, + isSearchable: boolean, + small: boolean, width: number, minWidth: number, } @@ -54,6 +55,7 @@ class Select extends Component { renderValue, width, minWidth, + small, ...props } = this.props @@ -64,7 +66,7 @@ class Select extends Component { classNamePrefix="select" options={options} components={createRenderers({ renderOption, renderValue })} - styles={createStyles({ width, minWidth })} + styles={createStyles({ width, minWidth, small })} placeholder={placeholder} isDisabled={isDisabled} isLoading={isLoading}