Skip to content

Commit f2a61ac

Browse files
committed
docs: README
1 parent 77dc96e commit f2a61ac

File tree

1 file changed

+108
-0
lines changed

1 file changed

+108
-0
lines changed

README.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,114 @@ should work of the example project.
113113

114114
You can use all of the customiztion options from the rn bouncy checkbox. You NEED to add the styling and props into the `data`. Therefore, you can customize each of the checkboxes easily.
115115

116+
## Advanced Usage Example JSON Data
117+
118+
```tsx
119+
const staticData: CheckboxButton[] = [
120+
{
121+
id: 0,
122+
fillColor: '#ff7473',
123+
unFillColor: '#fbbfbb',
124+
iconStyle: _iconStyle('#fbbfbb'),
125+
iconImageStyle: styles.iconImageStyle,
126+
},
127+
{
128+
id: 1,
129+
fillColor: '#5567e9',
130+
unFillColor: '#afb5f5',
131+
iconStyle: _iconStyle('#afb5f5'),
132+
iconImageStyle: styles.iconImageStyle,
133+
},
134+
{
135+
id: 2,
136+
fillColor: '#a98ae7',
137+
unFillColor: '#cab6f4',
138+
iconStyle: _iconStyle('#cab6f4'),
139+
iconImageStyle: styles.iconImageStyle,
140+
},
141+
{
142+
id: 3,
143+
fillColor: '#fcb779',
144+
unFillColor: '#ffd1a7',
145+
iconStyle: _iconStyle('#ffd1a7'),
146+
iconImageStyle: styles.iconImageStyle,
147+
},
148+
{
149+
id: 4,
150+
fillColor: '#2be055',
151+
unFillColor: '#cbf2d5',
152+
iconStyle: _iconStyle('#cbf2d5'),
153+
iconImageStyle: styles.iconImageStyle,
154+
},
155+
];
156+
```
157+
158+
159+
```tsx
160+
161+
const verticalStaticData: CheckboxButton[] = [
162+
{
163+
id: 0,
164+
text: 'Watermelon',
165+
fillColor: '#ff7473',
166+
unFillColor: '#fbbfbb',
167+
iconStyle: _iconStyle('#fbbfbb'),
168+
textStyle: styles.textStyle,
169+
style: styles.verticalStyle,
170+
iconImageStyle: styles.iconImageStyle,
171+
},
172+
{
173+
id: 1,
174+
text: 'Ultramarine Blue',
175+
fillColor: '#5567e9',
176+
unFillColor: '#afb5f5',
177+
iconStyle: _iconStyle('#afb5f5'),
178+
textStyle: styles.textStyle,
179+
style: styles.verticalStyle,
180+
iconImageStyle: styles.iconImageStyle,
181+
},
182+
{
183+
id: 2,
184+
text: 'Soft Purple',
185+
fillColor: '#a98ae7',
186+
unFillColor: '#cab6f4',
187+
iconStyle: _iconStyle('#cab6f4'),
188+
textStyle: styles.textStyle,
189+
style: styles.verticalStyle,
190+
iconImageStyle: styles.iconImageStyle,
191+
},
192+
{
193+
id: 3,
194+
text: 'Takao',
195+
fillColor: '#fcb779',
196+
unFillColor: '#ffd1a7',
197+
iconStyle: _iconStyle('#ffd1a7'),
198+
textStyle: styles.textStyle,
199+
style: styles.verticalStyle,
200+
iconImageStyle: styles.iconImageStyle,
201+
},
202+
{
203+
id: 4,
204+
text: 'Malachite',
205+
fillColor: '#2be055',
206+
unFillColor: '#cbf2d5',
207+
iconStyle: _iconStyle('#cbf2d5'),
208+
textStyle: styles.textStyle,
209+
style: styles.verticalStyle,
210+
iconImageStyle: styles.iconImageStyle,
211+
},
212+
];
213+
```
214+
215+
```tsx
216+
const _iconStyle = (borderColor: string) => ({
217+
height: 50,
218+
width: 50,
219+
borderRadius: 25,
220+
borderColor: borderColor,
221+
});
222+
```
223+
116224
## Future Plans
117225

118226
- [x] ~~LICENSE~~

0 commit comments

Comments
 (0)