Open
Description
I was wondering if you could expose pressed: boolean
props to allow simulating pressing buttons with other events, something like this
const AwesomeButton = ({
// ... existing props
pressed = false,
}: ButtonType) => {
// ... existing code
useEffect(() => {
if (pressed) {
pressIn({} as React.MouseEvent);
} else {
pressOut({} as React.MouseEvent);
}
}, [pressed]);
// ... existing code
}
I know that the active props already exits, but still, it doesn't fire the pressIn and pressOut functions, if you are ok with this, , I can work on the pull request.
Metadata
Assignees
Labels
No labels
Activity