diff --git a/App.tsx b/App.tsx index f4fbf280..f1ae54b8 100644 --- a/App.tsx +++ b/App.tsx @@ -46,11 +46,20 @@ import SwitchDemo from "./demo/components/switch-demo"; import TextareaDemo from "./demo/components/textarea-demo"; import CheckboxDemo from "./demo/components/checkbox-demo"; import RadioDemo from "./demo/components/radio-demo"; -import Stack, { HStack, VStack } from "./src/components/atoms/stack/stack"; +import SpinnerDemo from "./demo/components/spinner-demo"; +import SkeletonDemo from "./demo/components/skeleton-demo"; +import BadgeDemo from "./demo/components/badge-demo"; +import ProgressDemo from "./demo/components/progress-demo"; +import FadeDemo from "./demo/components/fade-demo"; +import ScaleFadeDemo from "./demo/components/scale-fade-demo"; +import SlideDemo from "./demo/components/slide-demo"; +import SlideFadeDemo from "./demo/components/slide-fade-demo"; +import CollapseDemo from "./demo/components/collapse-demo"; +import Stack, { HStack } from "./src/components/atoms/stack/stack"; import IconButton from "./src/components/molecules/icon-button/icon-button"; import Box from "./src/components/atoms/box/box"; import { FlatList, ScrollView } from "react-native"; -import { CheckBox, Radio, useTheme } from "./src"; +import { useTheme } from "./src"; const App = () => { const [haveFontsLoaded] = useFonts({ @@ -191,38 +200,47 @@ const componentList: { { label: "Spinner", imageSrc: require("./demo/assets/spinner.png"), + component: , }, { label: "Skeleton", imageSrc: require("./demo/assets/skeleton.png"), + component: , }, { label: "Badge", imageSrc: require("./demo/assets/badge.png"), + component: , }, { label: "Progress", imageSrc: require("./demo/assets/progress.png"), + component: , }, { label: "Fade", imageSrc: require("./demo/assets/fade.png"), + component: , }, { label: "Scale Fade", imageSrc: require("./demo/assets/scale-fade.png"), + component: , }, { label: "Slide", imageSrc: require("./demo/assets/slide.png"), + component: , }, { label: "Slide Fade", imageSrc: require("./demo/assets/slide-fade.png"), + component: , }, { label: "Collapse", imageSrc: require("./demo/assets/collapse.png"), + component: , }, ]; @@ -231,27 +249,6 @@ const Index = () => { const [activeComponent, setActiveComponent] = useState( undefined ); - const [radioGroupValue, setRadioGroupValue] = React.useState("B"); - const [checkboxGroupValue, setCheckboxGroupValue] = React.useState(["B"]); - const [checked, setChecked] = React.useState(false); - const [isLoaded, setIsLoaded] = React.useState(false); - const [progress, setProgress] = React.useState(0); - const [text, setText] = React.useState(""); - const [isOpen, setIsOpen] = React.useState(false); - - React.useEffect(() => { - const timer = setTimeout(() => { - setIsLoaded(true); - }, 2000); - return () => clearTimeout(timer); - }, []); - - React.useEffect(() => { - const progressTimer = setInterval(() => { - if (progress < 100) setProgress(progress + 10); - }, 500); - return () => clearInterval(progressTimer); - }, [progress]); const renderMainComponent = () => { if (!activeComponent) @@ -365,316 +362,6 @@ const Index = () => { ); - - return ( - - {/* - - - - - - - setChecked(!checked)} /> - - } - onPress={() => setIsOpen(!isOpen)} - > - Save - - - - - - alskdnalskndalknsdad - - - - - - Controlled Checkbox group - setCheckboxGroupValue(newVal)} - > - A - B - C - - - */} - - {/* - - - - - - setChecked(true)}> - Default Radio - - Disabled Radio - Checked Radio - Error Radio - - - - - - - setChecked(true)}> - Default Radio - - Disabled Radio - Checked Radio - Error Radio - - - - Controlled Radio group - setRadioGroupValue(newVal)} - > - A - B - C - - - - - Controlled Checkbox group - setCheckboxGroupValue(newVal)} - > - A - B - C - - - - - - - - -