useClearPinButton
function useClearPinButton(): {
buttonProps: {
className: string;
disabled: boolean;
onClick: () => void;
};
};Defined in: packages/react/src/hooks/controlbar/useClearPinButton.ts:23
The useClearPinButton hook provides props for the ClearPinButton() or your custom implementation of it component. It adds the onClick handler to signal the
Returns
{
buttonProps: {
className: string;
disabled: boolean;
onClick: () => void;
};
}buttonProps
buttonProps: {
className: string;
disabled: boolean;
onClick: () => void;
};buttonProps.className
className: string;buttonProps.disabled
disabled: boolean;buttonProps.onClick
onClick: () => void;Returns
void
Example
function FocusActions() {
const { buttonProps } = useClearPinButton();
return <button {...buttonProps}>Back to grid</button>;
}
<LayoutContextProvider><FocusActions /></LayoutContextProvider>;