feat: bool dispatcher

This commit is contained in:
cha0s 2020-06-21 21:46:26 -05:00
parent 370e04e005
commit 8a36a0594a

View File

@ -4,11 +4,12 @@ import React from 'react';
import propTypes from './prop-types';
const Bool = ({
dispatchers: {onChange = () => {}},
value,
}) => (
<select readOnly value={value}>
<option>false</option>
<option>true</option>
<select onChange={(event) => onChange(!!event.target.value)} value={value ? '1' : ''}>
<option value="">false</option>
<option value="1">true</option>
</select>
);