diff --git a/example/storybook-nativewind/src/components/Select/index.nw.stories.mdx b/example/storybook-nativewind/src/components/Select/index.nw.stories.mdx index 3bb16a9a15..79772d2780 100644 --- a/example/storybook-nativewind/src/components/Select/index.nw.stories.mdx +++ b/example/storybook-nativewind/src/components/Select/index.nw.stories.mdx @@ -535,7 +535,23 @@ It internally uses gluestack-ui's [ActionsheetItem](https://ui.gluestack.io/docs - - {`setting label that displays to the user.`} + {`Setting label that displays to the user.`} + + + + + + description + + + + string + + + - + + + {`Setting description that displays to the user. This prop only works on native.`} @@ -557,7 +573,23 @@ It internally uses gluestack-ui's [ActionsheetItem](https://ui.gluestack.io/docs - textStyle + labelTextStyle + + + + inherits all the properties of react native text + + + - + + + {`This prop only works on native.`} + + + + + + descriptionTextStyle @@ -570,6 +602,7 @@ It internally uses gluestack-ui's [ActionsheetItem](https://ui.gluestack.io/docs {`This prop only works on native.`} + diff --git a/example/storybook-nativewind/src/core-components/nativewind/button/index.tsx b/example/storybook-nativewind/src/core-components/nativewind/button/index.tsx index e8a8ac5230..7426195d7a 100644 --- a/example/storybook-nativewind/src/core-components/nativewind/button/index.tsx +++ b/example/storybook-nativewind/src/core-components/nativewind/button/index.tsx @@ -352,13 +352,14 @@ const ButtonIcon = React.forwardRef< size: parentSize, action: parentAction, } = useStyleContext(SCOPE); + const parentVariants = { variant: parentVariant, action: parentAction }; if (typeof size === 'number') { return ( ); @@ -370,7 +371,7 @@ const ButtonIcon = React.forwardRef< ); } @@ -380,8 +381,7 @@ const ButtonIcon = React.forwardRef< className={buttonIconStyle({ parentVariants: { size: parentSize, - variant: parentVariant, - action: parentAction, + ...parentVariants }, size, class: className, diff --git a/packages/unstyled/icon/src/primitiveIcon/index.tsx b/packages/unstyled/icon/src/primitiveIcon/index.tsx index 5940b498e2..12a70ee9b2 100644 --- a/packages/unstyled/icon/src/primitiveIcon/index.tsx +++ b/packages/unstyled/icon/src/primitiveIcon/index.tsx @@ -46,7 +46,7 @@ export const PrimitiveIcon = React.forwardRef< let colorProps = {}; if (fill) { - colorProps = { ...colorProps, fill: fill }; + colorProps = { ...colorProps, fill: fill === 'currentColor' ? color : fill }; } if (stroke !== 'currentColor') { colorProps = { ...colorProps, stroke: stroke }; diff --git a/packages/unstyled/select/src/SelectItem.tsx b/packages/unstyled/select/src/SelectItem.tsx index 2041125928..9338881e03 100644 --- a/packages/unstyled/select/src/SelectItem.tsx +++ b/packages/unstyled/select/src/SelectItem.tsx @@ -13,8 +13,10 @@ export const SelectItem = (StyledSelectItem: any, StyledSelectItemText: any) => // isHovered, // isInvalid, label, + description, value, - textStyle, + labelTextStyle, + descriptionTextStyle, ...props }: any, ref?: any @@ -44,8 +46,13 @@ export const SelectItem = (StyledSelectItem: any, StyledSelectItemText: any) => dataSet={{ checked: activeValue == value ? 'true' : 'false', }} + style={{ + flexDirection: 'column', + alignItems: 'flex-start' + }} > - {label} + {label} + {!!description && {description}} ); } diff --git a/packages/unstyled/select/src/types.ts b/packages/unstyled/select/src/types.ts index bcc17237e7..decad05b8c 100644 --- a/packages/unstyled/select/src/types.ts +++ b/packages/unstyled/select/src/types.ts @@ -21,6 +21,7 @@ export interface ISelectProps { export interface ISelectItemProps { label: string; + description: string; value: string; isDisabled?: boolean; } @@ -83,8 +84,11 @@ export type ISelectComponentType< ISelectItemProps & React.PropsWithoutRef & React.RefAttributes & { - textStyle?: { - [K in keyof SelectItemTextProps]?: SelectItemTextProps[K]; + labelTextStyle?: { + [K in keyof SelectItemTextProps]?: SelectItemTextProps[K]; + }; + descriptionTextStyle?: { + [K in keyof SelectItemTextProps]?: SelectItemTextProps[K]; }; } >;