File tree Expand file tree Collapse file tree 3 files changed +30
-47
lines changed
example/storybook-nativewind/src Expand file tree Collapse file tree 3 files changed +30
-47
lines changed Original file line number Diff line number Diff 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
5361export default TextMeta ;
5462
5563export { Text } ;
56- // export { TextSizes };
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { 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 ) ;
Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments