Skip to content

Commit

Permalink
fix: ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Niznikr committed Sep 24, 2024
1 parent 5c4348d commit 90f0913
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .changeset/angry-pears-return.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
"@launchpad-ui/icons": minor
"@launchpad-ui/avatar": patch
"@launchpad-ui/chip": patch
"@launchpad-ui/filter": patch
"@launchpad-ui/core": patch
---

Expand All @@ -9,3 +11,4 @@ Align API with RAC components:
- Remove outer `span`
- Prop `subtle` -> `variant`
- Prop `children` for custom icons
- Consolidate sizes
3 changes: 2 additions & 1 deletion packages/avatar/src/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ const Avatar = ({
}
return cloneElement(defaultIcon, {
className: classes,
// @ts-expect-error pass through
'data-test-id': testId,
size,
...(size !== 'tiny' && { size }),
...(rest as IconProps),
});
}
Expand Down
2 changes: 1 addition & 1 deletion packages/filter/src/FilterButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const FilterButton = forwardRef<Ref, FilterButtonProps>((props, ref) => {
aria-label={ariaLabel}
className={styles.clear}
data-test-id="clear-filter-button"
icon={<Icon name="cancel" size="tiny" />}
icon={<Icon name="cancel" size="small" />}
size="small"
onClick={onClear}
/>
Expand Down
3 changes: 2 additions & 1 deletion packages/icons/src/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ const Icon = ({
>
{title && <title id={titleId}>{title}</title>}
{description && <desc id={descriptionId}>{description}</desc>}
{children || <use href={`#lp-icon-${name}`} />}
{name && <use href={`#lp-icon-${name}`} />}
{children}
</svg>
);
};
Expand Down
2 changes: 1 addition & 1 deletion packages/tag/stories/Tag.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export const WithCustomTagContent: Story = {
<TagGroup items={MOCK_TAGS}>
{(item) => (
<TagItem>
<Icon name="star" size="tiny" style={{ transform: 'translateY(-1px)' }} /> {item.name}
<Icon name="star" size="small" style={{ transform: 'translateY(-1px)' }} /> {item.name}
</TagItem>
)}
</TagGroup>
Expand Down

0 comments on commit 90f0913

Please sign in to comment.