Fix button prop warnings
This commit is contained in:
@@ -34,12 +34,17 @@ export const Button = forwardRef(
|
|||||||
iconStyle,
|
iconStyle,
|
||||||
className,
|
className,
|
||||||
children,
|
children,
|
||||||
|
onPress,
|
||||||
|
onPressStart,
|
||||||
...rest
|
...rest
|
||||||
},
|
},
|
||||||
ref
|
ref
|
||||||
) => {
|
) => {
|
||||||
const buttonRef = useObjectRef(ref);
|
const buttonRef = useObjectRef(ref);
|
||||||
const { buttonProps } = useButton(rest, buttonRef);
|
const { buttonProps } = useButton(
|
||||||
|
{ onPress, onPressStart, ...rest },
|
||||||
|
buttonRef
|
||||||
|
);
|
||||||
|
|
||||||
// TODO: react-aria's useButton hook prevents form submission via keyboard
|
// TODO: react-aria's useButton hook prevents form submission via keyboard
|
||||||
// Remove the hack below after this is merged https://github.com/adobe/react-spectrum/pull/904
|
// Remove the hack below after this is merged https://github.com/adobe/react-spectrum/pull/904
|
||||||
|
|||||||
Reference in New Issue
Block a user