-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Is there a way to access the internal components to follow the react-select approach for customizing components? something like:
import React, { Fragment, useState } from 'react'
import Select, {
Control as SelectControl, // <-- side exports for destructuring maybe?
} from '@appgeist/react-select-material-ui'
const KINGDOMS = [
{ value: 'AS', label: 'Astur' },
{ value: 'FA', label: 'Fargos' },
{ value: 'LE', label: 'Laeden' },
{ value: 'TH', label: 'Therras' },
{ value: 'VE', label: 'Vessar' },
]
export default () => {
const [kingdom, setKingdom] = useState(null)
return (
<Fragment>
<h1>Fictional places:</h1>
<Select
id="place"
label="Kingdom"
placeholder="Select a kingdom"
options={KINGDOMS}
value={kingdom}
onChange={setKingdom}
isClearable
helperText="Where would you like to live?"
size="small"
components={{
Control: (props: any[]) => <SelectControl {...props} size="small" />,
}}
/>
</Fragment>
)
}Metadata
Metadata
Assignees
Labels
No labels