mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-07 08:53:25 +01:00
15 lines
377 B
JavaScript
15 lines
377 B
JavaScript
import React from 'react';
|
|
|
|
export default class ComboBoxControl extends React.Component {
|
|
|
|
render() {
|
|
let {onChange, value, children} = this.props;
|
|
return <select value={value} onChange={e => onChange(e.target.value)}>
|
|
{children}
|
|
</select>
|
|
}
|
|
}
|
|
|
|
export function ComboBoxOption({children, value}) {
|
|
return <option value={value}>{children}</option>
|
|
}
|