Skip to content

Commit ff94af6

Browse files
authored
Merge pull request #4889 from GeekyAnts/fix/input-example
fix: input width
2 parents b7d5aed + 6e883c4 commit ff94af6

File tree

5 files changed

+14
-18
lines changed

5 files changed

+14
-18
lines changed

example/storybook/stories/components/primitives/Input/Basic.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Input, Box } from 'native-base';
44
export const Example = () => {
55
return (
66
<Box alignItems="center">
7-
<Input mx="3" placeholder="Input" w="75%" maxWidth="300px" />
7+
<Input mx="3" placeholder="Input" w="100%" />
88
</Box>
99
);
1010
};

example/storybook/stories/components/primitives/Input/Controlled.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ export const Example = () => {
88
<Box alignItems="center">
99
<Input
1010
value={value}
11-
w="75%"
12-
maxW="300px"
11+
w="100%"
1312
onChangeText={handleChange}
1413
placeholder="Value Controlled Input"
1514
/>

example/storybook/stories/components/primitives/Input/Masked.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ export const Example = () => {
99
<Box alignItems="center">
1010
<Input
1111
type={show ? 'text' : 'password'}
12-
w="75%"
13-
maxW="300px"
12+
w="100%"
1413
py="0"
1514
InputRightElement={
1615
<Button
Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
import React from 'react';
2-
import { Input, Stack, Center } from 'native-base';
2+
import { Input, Stack } from 'native-base';
33

44
export const Example = () => {
55
return (
6-
<Center>
7-
<Stack mt={3} space={4} w="75%" maxW="300px">
8-
<Input size="xs" placeholder="xs Input" />
9-
<Input size="sm" placeholder="sm Input" />
10-
<Input size="md" placeholder="md Input" />
11-
<Input size="lg" placeholder="lg Input" />
12-
<Input size="xl" placeholder="xl Input" />
13-
<Input size="2xl" placeholder="2xl Input" />
14-
</Stack>
15-
</Center>
6+
<Stack space={4} w="75%" maxW="300px">
7+
<Input size="xs" placeholder="xs Input" />
8+
<Input size="sm" placeholder="sm Input" />
9+
<Input size="md" placeholder="md Input" />
10+
<Input size="lg" placeholder="lg Input" />
11+
<Input size="xl" placeholder="xl Input" />
12+
<Input size="2xl" placeholder="2xl Input" />
13+
</Stack>
1614
);
1715
};

example/storybook/stories/components/primitives/Input/Variant.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react';
2-
import { Input, Stack, Center } from 'native-base';
2+
import { Input, Stack } from 'native-base';
33
export const Example = () => {
44
return (
5-
<Stack space={4} w="75%">
5+
<Stack space={4} w="75%" maxW="300px">
66
<Input variant="outline" placeholder="Outline" />
77
<Input variant="filled" placeholder="Filled" />
88
<Input variant="underlined" placeholder="Underlined" />

0 commit comments

Comments
 (0)