React.createElement(() => {
const [fruit, setFruit] = React.useState('apple');
const options = [
{
label: 'Apple',
value: 'apple',
},
{
label: 'Pear',
value: 'pear',
},
{
label: 'Cherry',
value: 'cherry',
},
];
return (
<InputGroup label="Your favourite fruit">
<SelectField
label="Your favourite fruit"
helpText="This breaks the layout"
onChange={(e) => setFruit(e.target.value)}
options={options}
value={fruit}
/>
<TextField
label="Variety"
placeholder="Eg. Golden delicious"
/>
<Button label="Submit" />
</InputGroup>
);
})