Button
Button(
__namedParameters):Element
Defined in: packages/ui/src/components/Button.tsx:42
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
__namedParameters |
{ children: ReactNode; className?: string; label?: string; onPress: () => void; pressed?: boolean; } |
- |
__namedParameters.children |
ReactNode |
One icon, or a word or two. |
__namedParameters.className? |
string |
An override that shows in the diff. |
__namedParameters.label? |
string |
The accessible name, which a button of text takes from its text and a button of one icon needs spelled out. |
__namedParameters.onPress |
() => void |
The press. The component does not know what the state becomes: the caller owns it, and pressed is how it comes back. |
__namedParameters.pressed? |
boolean |
A toggle’s state; off dims the button. Left out by a button that holds none: a press that jumps the sun is over when it lands, so there is nothing to report. |
Returns
Section titled “Returns”Element