diff options
Diffstat (limited to 'app/src/Keyboard/Keys/KeyValue.js')
-rw-r--r-- | app/src/Keyboard/Keys/KeyValue.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/app/src/Keyboard/Keys/KeyValue.js b/app/src/Keyboard/Keys/KeyValue.js index 7aea967..b05c51d 100644 --- a/app/src/Keyboard/Keys/KeyValue.js +++ b/app/src/Keyboard/Keys/KeyValue.js @@ -1,13 +1,15 @@ import { useMemo } from 'react' +import PropTypes from 'prop-types' -import Icon from '../../Common/Icon' +import * as keyPropTypes from './keyPropTypes' import styles from './styles.module.css' +import Icon from '../../Common/Icon' function NullKey() { return <span>⦸</span> } -export default function KeyValue(props) { +function KeyValue(props) { const { param, index, value, source, onSelect } = props const title = source && `(${source.code}) ${source.description}` const text = source && <span>{source?.symbol || source?.code}</span> @@ -33,3 +35,13 @@ export default function KeyValue(props) { </span> ) } + +KeyValue.propTypes = { + index: PropTypes.number.isRequired, + param: keyPropTypes.param.isRequired, + value: keyPropTypes.value.isRequired, + source: keyPropTypes.source, + onSelect: PropTypes.func.isRequired +} + +export default KeyValue |