forked from yashton/terpstrakeyboard
-
Notifications
You must be signed in to change notification settings - Fork 3
/
key-labels.js
29 lines (26 loc) · 906 Bytes
/
key-labels.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { h } from 'preact';
import PropTypes from 'prop-types';
import { Fragment } from 'preact/compat';
// choose options for the displayed text on the keys
const KeyLabels = (props) => (
<>
<label>
Key Labels
<select name="key_labels" value={props.settings.key_labels} onChange={(e) => props.onChange(e.target.name, e.target.value)}>
<option value="equaves">Octaves/Equaves</option>
<option value="no_labels">Blank Keys</option>
<option value="enumerate">Scale Degrees</option>
<option value="note_names">Note Names</option>
<option value="scala_names">Ratios/Cents</option>
<option value="cents">Cents from Reference Degree</option>
</select>
</label>
</>
);
KeyLabels.propTypes = {
onChange: PropTypes.func.isRequired,
settings: PropTypes.shape({
key_labels: PropTypes.string,
}),
};
export default KeyLabels;