Skip to content

Commit 5c70f37

Browse files
SurajSuraj
authored andcommitted
Merge branch 'patch' of github.com:gluestack/gluestack-ui into patch
2 parents 9737729 + ede5a3e commit 5c70f37

File tree

3 files changed

+30
-47
lines changed

3 files changed

+30
-47
lines changed

example/storybook-nativewind/src/components/Text/Text.stories.tsx

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,37 @@ const TextMeta: ComponentMeta<typeof Text> = {
2727
'6xl',
2828
],
2929
},
30-
fontWeight: {
31-
control: 'select',
32-
options: [
33-
'hairline',
34-
'thin',
35-
'light',
36-
'normal',
37-
'medium',
38-
'semibold',
39-
'bold',
40-
'extrabold',
41-
'black',
42-
'extrablack',
43-
],
30+
bold: {
31+
control: 'boolean',
32+
},
33+
italic: {
34+
control: 'boolean',
35+
},
36+
underline: {
37+
control: 'boolean',
38+
},
39+
strikeThrough: {
40+
control: 'boolean',
41+
},
42+
highlight: {
43+
control: 'boolean',
44+
},
45+
sub: {
46+
control: 'boolean',
4447
},
4548
},
4649
args: {
4750
text: 'Hello world',
4851
size: 'md',
49-
fontWeight: 'medium',
52+
bold: false,
53+
italic: false,
54+
underline: false,
55+
strikeThrough: false,
56+
highlight: false,
57+
sub: false,
5058
},
5159
};
5260

5361
export default TextMeta;
5462

5563
export { Text };
56-
// export { TextSizes };

example/storybook-nativewind/src/components/Text/Text.tsx

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,9 @@
11
import React from 'react';
22
import { Text } from '@/components/ui/text';
33

4-
const TextBasic = ({
5-
size = 'md',
6-
text = 'Hello world',
7-
fontWeight = 'bold',
8-
...props
9-
}: any) => {
10-
const fontWeights = {
11-
hairline: 'font-hairline',
12-
thin: 'font-thin',
13-
light: 'font-light',
14-
normal: 'font-normal',
15-
medium: 'font-medium',
16-
semibold: 'font-semibold',
17-
bold: 'font-bold',
18-
extrabold: 'font-extrabold',
19-
black: 'font-black',
20-
extrablack: 'font-extrablack',
21-
};
22-
4+
const TextBasic = ({ size = 'md', text = 'Hello world', ...props }: any) => {
235
return (
24-
<Text
25-
size={size}
26-
{...props}
27-
className={`${fontWeights[fontWeight as keyof typeof fontWeights]}`}
28-
>
6+
<Text size={size} {...props}>
297
{text}
308
</Text>
319
);

example/storybook-nativewind/src/core-components/nativewind/menu/index.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,21 +119,19 @@ const Menu = React.forwardRef(
119119
ref={ref}
120120
initial={{
121121
opacity: 0,
122+
scale: 0.8,
122123
}}
123124
animate={{
124125
opacity: 1,
126+
scale: 1,
125127
}}
126128
exit={{
127129
opacity: 0,
130+
scale: 0.8,
128131
}}
129132
transition={{
130-
type: 'spring',
131-
damping: 18,
132-
stiffness: 250,
133-
opacity: {
134-
type: 'timing',
135-
duration: 200,
136-
},
133+
type: 'timing',
134+
duration: 100,
137135
}}
138136
className={menuStyle({
139137
class: className,

0 commit comments

Comments
 (0)