Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f31f3cc

Browse files
authoredJun 12, 2024··
feat: export useProviderProps hook (#479)
1 parent 1ed8e24 commit f31f3cc

File tree

6 files changed

+30
-3
lines changed

6 files changed

+30
-3
lines changed
 

‎.changeset/early-points-design.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cube-dev/ui-kit': patch
3+
---
4+
5+
Export useProviderProps and UIKitContext.

‎.changeset/loud-years-admire.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cube-dev/ui-kit': patch
3+
---
4+
5+
Improve styles for Radio.Button

‎.changeset/rare-ears-sin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cube-dev/ui-kit': patch
3+
---
4+
5+
Export useProviderProps hook.

‎src/components/forms/RadioGroup/Radio.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,23 @@ const RadioWrapperElement = tasty({
3030
styles: {
3131
position: 'relative',
3232
display: 'grid',
33-
placeItems: 'center start',
33+
placeItems: {
34+
'': 'center start',
35+
button: 'stretch',
36+
},
3437
gap: '1x',
3538
flow: 'column',
3639
preset: 'default',
3740
width: 'min-content',
3841
margin: {
3942
'': '1x right',
40-
'[data-type="button"]': '0',
43+
button: '0',
4144
},
4245
zIndex: {
4346
'': 'initial',
4447
checked: 1,
4548
},
49+
flexGrow: 1,
4650

4751
Input: {
4852
radius: {
@@ -63,6 +67,8 @@ const RadioWrapperElement = tasty({
6367

6468
const RadioButtonElement = tasty({
6569
styles: {
70+
display: 'grid',
71+
placeItems: 'center',
6672
fill: {
6773
'': '#white',
6874
hovered: '#purple-text.04',
@@ -93,6 +99,7 @@ const RadioButtonElement = tasty({
9399
focused: '#purple-03',
94100
},
95101
transition: 'theme',
102+
whiteSpace: 'nowrap',
96103
},
97104
});
98105

@@ -124,6 +131,7 @@ const RadioNormalElement = tasty({
124131
focused: '#purple-03',
125132
},
126133
transition: 'theme',
134+
whiteSpace: 'nowrap',
127135

128136
RadioCircle: {
129137
display: 'block',

‎src/components/forms/RadioGroup/RadioGroup.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ const RadioGroupElement = tasty({
4949
solid: 0,
5050
},
5151
whiteSpace: 'nowrap',
52+
flexGrow: {
53+
'': 'initial',
54+
solid: 1,
55+
},
5256
},
5357
});
5458

‎src/provider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export function Provider(allProps: PropsWithChildren<ProviderProps>) {
8888
);
8989
}
9090

91-
export function useProviderProps<T extends Props = Props>(props: T): T {
91+
export function useProviderProps<T extends ProviderProps = Props>(props: T): T {
9292
const contextProps = useContext(UIKitContext);
9393

9494
return { ...contextProps, ...props } as T;

0 commit comments

Comments
 (0)
Please sign in to comment.