Closed benmonro closed 8 years ago
The minimal template for a checkbox I can think of is:
var Foo = t.struct({
bar: t.Boolean
});
var options = {
fields: {
bar: {
template: (locals) => {
return (
<div>
<label>{locals.label}</label>
<input type="checkbox" checked={locals.value} onChange={evt => locals.onChange(evt.target.checked)}/>
</div>
);
}
}
}
};
currently the checkbox field has the checkbox followed by the label. I'm just curious how you can move customize this? I want to just keep the existing checkbox. I was thinking it'd be something like this: