File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
example/src/modules/primitives Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,19 @@ export const ButtonScreen = () => {
2525 const [ hasPrefix , setHasPrefix ] = useState < boolean > ( false ) ;
2626 const [ hasSuffix , setHasSuffix ] = useState < boolean > ( false ) ;
2727 const [ isLoading , setIsLoading ] = useState < boolean > ( false ) ;
28+ const [ fullWidth , setFullWidth ] = useState < boolean > ( false ) ;
29+
2830 const { bottom } = useSafeAreaInsets ( ) ;
2931
3032 return (
3133 < Box style = { tailwind . style ( "flex-1 justify-center bg-white-900" ) } >
32- < Box style = { tailwind . style ( "flex-1 px-2 justify-center bg-white-900" ) } >
34+ < Box
35+ style = { tailwind . style (
36+ `flex-1 px-2 justify-center bg-white-900 ${
37+ fullWidth ? "" : "items-center"
38+ } `,
39+ ) }
40+ >
3341 < Button
3442 variant = { selectedVariant }
3543 themeColor = { selectedTheme }
@@ -118,6 +126,15 @@ export const ButtonScreen = () => {
118126 style = { tailwind . style ( "mt-2 ml-1" ) }
119127 label = "Loading"
120128 />
129+ < Switch
130+ state = { fullWidth }
131+ onStateChange = { ( value : SetStateAction < boolean > ) =>
132+ setFullWidth ( value )
133+ }
134+ size = "md"
135+ style = { tailwind . style ( "mt-2 ml-1" ) }
136+ label = "Full Width"
137+ />
121138 </ Box >
122139 </ Box >
123140 </ Box >
You can’t perform that action at this time.
0 commit comments