@wix/design-system
Version:
@wix/design-system
45 lines (41 loc) • 1.84 kB
Markdown
### children
- type: ReactNode
- description: Accepts any item as a child element. For all common cases pass a standard text string.
### disabled
- type: boolean
- description: Specifies whether user interactions are disabled.
### skin
- type: "standard" | "dark"
- description: Controls the text color skin of the button.
- default: dark
### size
- type: "small" | "medium" | "large"
- description: Controls the size of a button.
- default: medium
### onClick
- type: MouseEventHandler
- description: Defines a callback function which is called every time a button is clicked.
### dataHook
- type: string
- description: Applies a data-hook HTML attribute that can be used in the tests.
### tooltipProps
- type: TooltipCommonProps
- description: Allows to pass all common tooltip props. Use it to customize a tooltip created from text ellipsis.
### suffixIcon
- type: ReactElement
- description: Pass an icon or a component to display at the end of a label (e.g., svg, image, etc.)
### ellipsis
- type: boolean
- description: Specifies whether component handles text overflow with ellipsis. If enabled, label that exceed available space will be displayed inside of a tooltip when user hover over a button.
### fullWidth
- type: boolean
- description: Sets button width to fill a 100% of a parent container width.
### showTooltip
- type: boolean
- description: Specifies whether the full button label is displayed in a tooltip when label overflows available space.
Behaviour is enabled by default. Set property value to false to show ellipsis without a tooltip.
### ref
- type: null | string | (instance: Button | null) => void | RefObject<Button>
- description: Allows getting a ref to the component instance.
Once the component unmounts, React will set `ref.current` to `null`
(or call the ref with `null` if you passed a callback ref).