// Copyright 2017-2018 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. import { SectionItem } from '@polkadot/params/types'; import { Storages } from '@polkadot/storage/types'; import { DropdownOptions } from '../util/types'; import { I18nProps } from '../types'; import React from 'react'; import map from '@polkadot/storage'; import Dropdown from '../Dropdown'; import classes from '../util/classes'; import translate from '../translate'; type Props = I18nProps & { isError?: boolean, label?: string, onChange: (value: SectionItem) => void, options: DropdownOptions, value: SectionItem, withLabel?: boolean }; class SelectKey extends React.PureComponent { render () { const { className, isError, label = '', onChange, options, style, t, value: { name, section }, withLabel } = this.props; if (!options.length) { return null; } const transform = (name: string): SectionItem => map[section].public[name]; return ( ); } } export default translate(SelectKey);