UNPKG

@wordpress/components

Version:
30 lines 948 B
import type { WordPressComponentProps } from '../context'; import type { RadioControlProps } from './types'; /** * Render a user interface to select the user type using radio inputs. * * ```jsx * import { RadioControl } from '@wordpress/components'; * import { useState } from '@wordpress/element'; * * const MyRadioControl = () => { * const [ option, setOption ] = useState( 'a' ); * * return ( * <RadioControl * label="User type" * help="The type of the current user" * selected={ option } * options={ [ * { label: 'Author', value: 'a' }, * { label: 'Editor', value: 'e' }, * ] } * onChange={ ( value ) => setOption( value ) } * /> * ); * }; * ``` */ export declare function RadioControl(props: WordPressComponentProps<RadioControlProps, 'input', false>): import("react").JSX.Element | null; export default RadioControl; //# sourceMappingURL=index.d.ts.map