Button
A button that is clickable, every button is clickable, unless you dont make it clickable
import { Button } from "@neneys/ui"
Button('#id', { ... })
Parameters
| Param | Value |
|---|---|
| child | Text |
| leading | Icon |
| type | ButtonType |
| density | ButtonDensity |
| shape | ButtonShape |
| disabled | bool |
| onPressed | DoAction |
ButtonType
- ButtonType.Normal
- ButtonType.Primary
- ButtonType.Success
- ButtonType.Danger
- ButtonType.Info
- ButtonType.Warning
ButtonDensity
- ButtonDensity.compact
- ButtonDensity.dense
- ButtonDensity.normal
- ButtonDensity.comfortable
- ButtonDensity.icon
ButtonShape
- ButtonShape.circle
- ButtonShape.rectangle
Example
import { Button, ButtonType, Action, DoAction, Text } from "@neneys/ui"
Button('#button', {
child: Text('#buttonText', {text: "Hello World"}),
type: ButtonType.Primary,
onPressed: DoAction(Action.SHOW_TOAST, "Hello World")
})