Browse Source

Adjust the Selects empty option texts

master
meriadec 7 years ago
parent
commit
01a913aade
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 3
      src/components/SelectAccount/index.js
  2. 3
      src/components/SelectCurrency/index.js
  3. 4
      src/components/SelectExchange.js
  4. 2
      src/components/SettingsPage/sections/Display.js
  5. 4
      static/i18n/en/app.yml

3
src/components/SelectAccount/index.js

@ -69,6 +69,9 @@ const RawSelectAccount = ({ accounts, onChange, value, t, ...props }: Props) =>
renderValue={renderOption}
renderOption={renderOption}
placeholder={t('app:common.selectAccount')}
noOptionsMessage={({ inputValue }) =>
t('app:common.selectAccountNoOption', { accountName: inputValue })
}
onChange={onChange}
/>
)

3
src/components/SelectCurrency/index.js

@ -40,6 +40,9 @@ const SelectCurrency = ({ onChange, value, t, placeholder, currencies, ...props
renderValue={renderOption}
options={options}
placeholder={placeholder || t('app:common.selectCurrency')}
noOptionsMessage={({ inputValue }: { inputValue: string }) =>
t('app:common.selectCurrencyNoOption', { currencyName: inputValue })
}
onChange={item => onChange(item ? item.currency : null)}
{...props}
/>

4
src/components/SelectExchange.js

@ -93,6 +93,10 @@ class SelectExchange extends Component<
options={options}
onChange={onChange}
isLoading={options.length === 0}
placeholder={t('app:common.selectExchange')}
noOptionsMessage={({ inputValue }) =>
t('app:common.selectExchangeNoOption', { exchangeName: inputValue })
}
{...props}
/>
)

2
src/components/SettingsPage/sections/Display.js

@ -169,7 +169,7 @@ class TabProfile extends PureComponent<Props, State> {
to={counterValueCurrency}
exchangeId={counterValueExchange}
onChange={this.handleChangeExchange}
minWidth={150}
minWidth={200}
/>
</Box>
</Row>

4
static/i18n/en/app.yml

@ -11,7 +11,11 @@ common:
chooseWalletPlaceholder: Choose a wallet...
currency: Currency
selectAccount: Select an account
selectAccountNoOption: 'No account matching "{{accountName}}"'
selectCurrency: Select a currency
selectCurrencyNoOption: 'No currency matching "{{currencyName}}"'
selectExchange: Select an exchange
selectExchangeNoOption: 'No exchange matching "{{exchangeName}}"'
sortBy: Sort by
search: Search
save: Save

Loading…
Cancel
Save