Skip to content

Commit 2fd73e0

Browse files
committed
chore(example-app): ⚡ add Input component Screen with examples
1 parent f72b8b4 commit 2fd73e0

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed

example/src/AppRoot.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
ButtonScreen,
99
CheckboxScreen,
1010
CircularProgressScreen,
11+
InputScreen,
1112
MeterComponentScreen,
1213
ProgressScreen,
1314
RadioScreen,
@@ -22,7 +23,7 @@ const Drawer = createDrawerNavigator();
2223

2324
const AppRoot = () => {
2425
return (
25-
<Drawer.Navigator initialRouteName="CircularProgressScreen">
26+
<Drawer.Navigator initialRouteName="InputScreen">
2627
<Drawer.Screen
2728
options={{ title: "Avatar" }}
2829
name="AvatarScreen"
@@ -89,10 +90,15 @@ const AppRoot = () => {
8990
component={SliderComponentScreen}
9091
/>
9192
<Drawer.Screen
92-
options={{ title: "CircularProgress" }}
93+
options={{ title: "Circular Progress" }}
9394
name="CircularProgressScreen"
9495
component={CircularProgressScreen}
9596
/>
97+
<Drawer.Screen
98+
options={{ title: "Input" }}
99+
name="InputScreen"
100+
component={InputScreen}
101+
/>
96102
</Drawer.Navigator>
97103
);
98104
};
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React from "react";
2+
import {
3+
Box,
4+
Icon,
5+
Info,
6+
Input,
7+
useTheme,
8+
} from "@adaptui/react-native-tailwind";
9+
10+
export const InputScreen = () => {
11+
const tailwind = useTheme();
12+
13+
return (
14+
<Box style={tailwind.style("flex-1 px-2 justify-center bg-white-900")}>
15+
<Input
16+
textInputWrapperProps={{ style: tailwind.style("my-2") }}
17+
placeholder={"Placeholder"}
18+
suffix={<Icon icon={<Info />} />}
19+
/>
20+
<Input
21+
textInputWrapperProps={{ style: tailwind.style("my-2") }}
22+
placeholder={"Placeholder"}
23+
variant="subtle"
24+
suffix={<Icon icon={<Info />} />}
25+
/>
26+
<Input
27+
textInputWrapperProps={{ style: tailwind.style("my-2") }}
28+
placeholder={"Placeholder"}
29+
variant="underline"
30+
suffix={<Icon icon={<Info />} />}
31+
/>
32+
<Input
33+
textInputWrapperProps={{ style: tailwind.style("my-2") }}
34+
placeholder={"Placeholder"}
35+
variant="ghost"
36+
suffix={<Icon icon={<Info />} />}
37+
/>
38+
</Box>
39+
);
40+
};

example/src/modules/forms/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export * from "./InputScreen";
12
export * from "./RadioScreen";
23
export * from "./SliderComponentScreen";
34
export * from "./SwitchComponentScreen";

0 commit comments

Comments
 (0)