Skip to content

Commit

Permalink
Merge pull request #2406 from gluestack/main
Browse files Browse the repository at this point in the history
Backmerge Main -> Patch
  • Loading branch information
Viraj-10 authored Aug 23, 2024
2 parents e5053c1 + 1b9084c commit 303b472
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions packages/unstyled/icon/src/createIcon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ export function createIcon<IconProps>({
...props,
};

const { stroke = 'currentColor', color, ...resolvedProps } = finalProps;
const {
stroke = 'currentColor',
color,
role = 'img',
...resolvedProps
} = finalProps;
let type = resolvedProps.type;
if (type === undefined) {
type = 'svg';
Expand Down Expand Up @@ -93,7 +98,7 @@ export function createIcon<IconProps>({
<Root
{...resolvedProps}
{...colorProps}
role="img"
role={role}
ref={ref}
{...sizeProps}
{...sizeStyle}
Expand Down
9 changes: 7 additions & 2 deletions packages/unstyled/icon/src/createIcon/index.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ export function createIcon<IconProps>({
...props,
};

const { stroke = 'currentColor', color, ...resolvedProps } = finalProps;
const {
stroke = 'currentColor',
color,
role = 'img',
...resolvedProps
} = finalProps;
let type = resolvedProps.type;
if (type === undefined) {
type = 'svg';
Expand Down Expand Up @@ -92,7 +97,7 @@ export function createIcon<IconProps>({
<Root
{...resolvedProps}
{...colorProps}
role="img"
role={role}
ref={ref}
{...sizeProps}
{...sizeStyle}
Expand Down

0 comments on commit 303b472

Please sign in to comment.