Home > @uniformdev/design-system > markNativeButton
markNativeButton() function
Static marker used by isNativeButtonTrigger() to detect design-system components whose root DOM node is a real <button>; setting this marker on the wrapper component allows those triggers to opt back into the native-button code path safely.
Set this marker via markNativeButton() on any forwardRef/component whose root DOM node is <button>. Consumers writing custom triggers can do the same.
Signature:
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
component |
T |
Returns:
T
Example
export const MyButton = markNativeButton(forwardRef(...));