-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(example-app): ✨ add Switch Component Screen with examples
- Loading branch information
1 parent
7cfdc85
commit fdbc62c
Showing
4 changed files
with
64 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React from "react"; | ||
import { Box, Switch, useTheme } from "@adaptui/react-native-tailwind"; | ||
|
||
export const SwitchComponentScreen = () => { | ||
const tailwind = useTheme(); | ||
return ( | ||
<Box style={tailwind.style("flex-1 justify-center bg-white-900")}> | ||
<Box style={tailwind.style("my-2 items-center")}> | ||
<Switch /> | ||
</Box> | ||
<Box style={tailwind.style("my-2")}> | ||
<Switch style={tailwind.style("mx-2 justify-between")} label="Wifi" /> | ||
</Box> | ||
<Box style={tailwind.style("my-2 items-center")}> | ||
<Switch disabled label="Disabled-Off" /> | ||
</Box> | ||
<Box style={tailwind.style("my-2 items-center")}> | ||
<Switch defaultState={true} disabled label="Disabled-On" /> | ||
</Box> | ||
<Box style={tailwind.style("my-2 mx-4")}> | ||
<Switch | ||
label="Isolation" | ||
description="Utilities for controlling whether an element should explicitly create a new stacking context." | ||
/> | ||
</Box> | ||
<Box style={tailwind.style("my-2 items-center")}> | ||
<Switch themeColor="primary" /> | ||
</Box> | ||
<Box style={tailwind.style("my-2 items-center")}> | ||
<Switch themeColor="primary" label="Wifi" /> | ||
</Box> | ||
<Box style={tailwind.style("my-2 items-center")}> | ||
<Switch themeColor="primary" disabled label="Disabled-Off" /> | ||
</Box> | ||
<Box style={tailwind.style("my-2 items-center")}> | ||
<Switch | ||
themeColor="primary" | ||
defaultState={true} | ||
disabled | ||
label="Disabled-On" | ||
/> | ||
</Box> | ||
<Box style={tailwind.style("my-2 mx-4")}> | ||
<Switch | ||
themeColor="primary" | ||
label="Isolation" | ||
description="Utilities for controlling whether an element should explicitly create a new stacking context." | ||
/> | ||
</Box> | ||
</Box> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./SwitchComponentScreen"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from "./feedback"; | ||
export * from "./forms"; | ||
export * from "./popups"; | ||
export * from "./primitives"; |