You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/docs/components/checkbox.md
+68-10
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
-
import { Checkbox, HStack } from '@amalgama/react-native-ui-kit'
1
+
import { Checkbox, HStack, Icon } from '@amalgama/react-native-ui-kit'
2
+
import Feather from 'react-native-vector-icons/Feather';
2
3
import CodePreview from '@site/src/components/CodePreview';
3
4
import ExampleCheckbox from '@site/src/components/ExampleCheckbox';
4
5
import ExampleCheckboxGroup from '@site/src/components/ExampleCheckboxGroup';
@@ -39,7 +40,7 @@ const App = () => {
39
40
40
41
### Props
41
42
42
-
### selected
43
+
####selected
43
44
If the checkbox is selected or not.
44
45
45
46
| TYPE | REQUIRED | DEFAULT |
@@ -58,7 +59,7 @@ If the checkbox is selected or not.
58
59
<Checkbox selected />
59
60
```
60
61
61
-
### indeterminated
62
+
####indeterminated
62
63
If the checkbox is indeterminated or not. This is usually used for lists of checkboxes when some of their children are checked but not all of them. This is only a visual state, it only changes the checkbox icon.
63
64
64
65
| TYPE | REQUIRED | DEFAULT |
@@ -73,7 +74,7 @@ If the checkbox is indeterminated or not. This is usually used for lists of chec
73
74
<Checkbox indeterminated />
74
75
```
75
76
76
-
### label
77
+
####label
77
78
Shows a label text next to the checkbox icon.
78
79
79
80
| TYPE | REQUIRED |
@@ -88,7 +89,7 @@ Shows a label text next to the checkbox icon.
88
89
<Checkbox label="Checkbox"/>
89
90
```
90
91
91
-
### value
92
+
####value
92
93
If the checkbox is inside a `Checkbox.Group` this prop indicates the value for it.
93
94
94
95
| TYPE | REQUIRED |
@@ -99,7 +100,7 @@ If the checkbox is inside a `Checkbox.Group` this prop indicates the value for i
99
100
If the `Checkbox` is inside a `Checkbox.Group` this prop is required and will throw an `Exception` if not set.
100
101
:::
101
102
102
-
### disabled
103
+
####disabled
103
104
If the checkbox is disabled or not.
104
105
105
106
| TYPE | REQUIRED | DEFAULT |
@@ -120,7 +121,7 @@ If the checkbox is disabled or not.
120
121
<Checkbox disabled indeterminated />
121
122
```
122
123
123
-
### onPress
124
+
####onPress
124
125
Invoked when the checkbox is pressed.
125
126
126
127
| TYPE | REQUIRED |
@@ -135,6 +136,63 @@ Invoked when the checkbox is pressed.
135
136
<Checkbox onPress={ () => { window.alert( 'The checkbox was pressed!' ) } }/>
136
137
```
137
138
139
+
#### checkedIcon
140
+
An icon component to show when the checkbox is selected. The default value is the `box-checked` icon from the `UIKitIcon` icons package.
0 commit comments