import * as React from 'react'; import { Checkbox, ICheckboxProps } from 'office-ui-fabric-react/lib/Checkbox'; import { Link } from 'office-ui-fabric-react/lib/Link'; import { Stack } from 'office-ui-fabric-react/lib/Stack'; // Optional extra props to pass through to the input element const inputProps: ICheckboxProps['inputProps'] = { onFocus: () => console.log('Checkbox is focused'), onBlur: () => console.log('Checkbox is blurred'), }; // Used to add spacing between example checkboxes const stackTokens = { childrenGap: 10 }; export const CheckboxOtherExample: React.FunctionComponent = () => { // Only for the first checkbox, which is controlled const [isChecked, setIsChecked] = React.useState(true); const onChange = React.useCallback((ev: React.FormEvent, checked: boolean): void => { setIsChecked(!!checked); }, []); return ( ); }; function _renderLabelWithLink() { return ( Custom-rendered label with a{' '} link ); }