File tree Expand file tree Collapse file tree 5 files changed +34
-13
lines changed
example/storybook/stories/components Expand file tree Collapse file tree 5 files changed +34
-13
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,11 @@ const myTheme = extendTheme({
69
69
} ;
70
70
} ,
71
71
} ,
72
+ sizes : {
73
+ 'my-size' : {
74
+ padding : 2 ,
75
+ } ,
76
+ } ,
72
77
} ,
73
78
74
79
Checkbox : {
@@ -138,8 +143,9 @@ export function RenderTestButton() {
138
143
const [ state , setState ] = React . useState ( 1 ) ;
139
144
return (
140
145
< Box style = { { position : 'absolute' , top : 10 , left : 20 } } m = { 2 } bg = "red.100" >
141
- < Input m = { 2 } />
146
+ < Input m = { 2 } size = "my-size" />
142
147
< Button
148
+ size = ""
143
149
variant = { 'myNewButton' }
144
150
// title={state.toString()}
145
151
onPress = { ( ) => setState ( state + 1 ) }
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import type { InterfacePressableProps } from '../Pressable/types';
27
27
// type buttonVariant = VariantTypeTest<'Button'>;
28
28
// Todo: Create underscore Props section on docs.
29
29
// _hover?: IButtonProps;
30
+
30
31
export interface InterfaceButtonProps
31
32
extends InterfacePressableProps < IButtonProps > {
32
33
/**
@@ -62,13 +63,7 @@ export interface InterfaceButtonProps
62
63
/**
63
64
* The size of the button.
64
65
*/
65
- size ?:
66
- | 'xs'
67
- | 'sm'
68
- | 'md'
69
- | 'lg'
70
- | ( string & { } )
71
- | ThemeComponentSizeType < 'Button' > ;
66
+ size ?: ThemeComponentSizeType < 'Button' > ;
72
67
// size?: SizeType;
73
68
/**
74
69
* The start icon element to use in the button.
@@ -186,6 +181,9 @@ export type IButtonComponentType = ((
186
181
187
182
export type IButtonProps = InterfaceButtonProps & CustomProps < 'Button' > ;
188
183
184
+ // const a: IButtonProps = {
185
+ // size:'' ;
186
+ // }
189
187
// type myProps = CustomProps<'Input'>;
190
188
// export type IInputProps = InterfaceInputProps & CustomProps<'Input'>;
191
189
Original file line number Diff line number Diff line change 1
1
import type { TextInputProps } from 'react-native' ;
2
2
import type { StyledProps } from '../../../theme/types' ;
3
- import type { CombinedSizeType , PlatformProps , VariantType } from '../../types' ;
3
+ import type {
4
+ PlatformProps ,
5
+ ThemeComponentSizeType ,
6
+ VariantType ,
7
+ } from '../../types' ;
4
8
import type { InterfaceBoxProps } from '../Box' ;
5
9
import type { ResponsiveValue } from '../../../components/types' ;
6
10
import type { ISizes } from '../../../theme/base/sizes' ;
@@ -36,7 +40,7 @@ export interface InterfaceInputProps
36
40
* The size of the input.
37
41
* @default 'md'
38
42
*/
39
- size ?: CombinedSizeType < 'Input' > ; // ResponsiveValue<ISizes | (string & {}) | number>;
43
+ size ?: ThemeComponentSizeType < 'Input' > ; // ResponsiveValue<ISizes | (string & {}) | number>;
40
44
/**
41
45
* This will set aria-required="true" on web when passed in formcontrol.
42
46
*/
Original file line number Diff line number Diff line change @@ -21,9 +21,7 @@ export type SizeType = ResponsiveValue<
21
21
export type ThemeComponentSizeType <
22
22
Component extends keyof ITheme [ 'components' ]
23
23
> = 'sizes' extends keyof ITheme [ 'components' ] [ Component ]
24
- ? ResponsiveValue <
25
- keyof ITheme [ 'components' ] [ Component ] [ 'sizes' ] | ( string & { } )
26
- >
24
+ ? keyof ITheme [ 'components' ] [ Component ] [ 'sizes' ] | ( string & { } )
27
25
: never ;
28
26
29
27
export type CombinedSizeType < Component extends keyof ITheme [ 'components' ] > =
Original file line number Diff line number Diff line change 2337
2337
"@react-aria/utils" "^3.6.0"
2338
2338
"@react-native-aria/utils" "^0.2.6"
2339
2339
2340
+ "@react-native-aria/
[email protected] ":
2341
+ version "0.2.4-alpha.3"
2342
+ resolved "https://registry.yarnpkg.com/@react-native-aria/listbox/-/listbox-0.2.4-alpha.3.tgz#1a8df0de6c932c8143ea73e43713a5d37070203c"
2343
+ integrity sha512-e/y+Wdoyy/PbpFj4DVYDYMsKI+uUqnZ/0yLByqHQvzs8Ys8o69CQkyEYzHhxvFT5lCLegkLbuQN2cJd8bYNQsA==
2344
+ dependencies:
2345
+ "@react-aria/interactions" "^3.3.2"
2346
+ "@react-aria/label" "^3.1.1"
2347
+ "@react-aria/listbox" "^3.2.4"
2348
+ "@react-aria/selection" "^3.3.2"
2349
+ "@react-aria/utils" "^3.6.0"
2350
+ "@react-native-aria/interactions" "^0.2.2"
2351
+ "@react-native-aria/utils" "^0.2.6"
2352
+ "@react-types/listbox" "^3.1.1"
2353
+ "@react-types/shared" "^3.4.0"
2354
+
2340
2355
"@react-native-aria/
[email protected] ":
2341
2356
version "0.3.3-rc.0"
2342
2357
resolved "https://registry.yarnpkg.com/@react-native-aria/overlays/-/overlays-0.3.3-rc.0.tgz#9041ddd6f151e6edb50c971d29920c458aa41459"
You can’t perform that action at this time.
0 commit comments