Skip to content

Commit

Permalink
refactor: remove dimenstions from SidebarHeader Icon (#35)
Browse files Browse the repository at this point in the history
* refactor: remove dimensions from SidebarHeader Icon

* chore: add changeset
  • Loading branch information
Cahllagerfeld authored Oct 23, 2023
1 parent 4a79333 commit d541014
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/nice-jeans-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zenml-io/react-component-library": patch
---

remove dimenstions from SidebarHeader Icon
10 changes: 5 additions & 5 deletions src/components/Sidebar/Sidebar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const defaultStory: Story = {
args: {
children: (
<>
<SidebarHeader icon={<CloseButton />} title="ZenML Tenant">
<SidebarHeader icon={<CloseButton className="w-6 h-6" />} title="ZenML Tenant">
<SidebarHeaderImage>
<img src={`https://avatar.vercel.sh/ZenMLTenant?size=32`} />
</SidebarHeaderImage>
Expand All @@ -50,29 +50,29 @@ export const defaultStory: Story = {
<li className="w-full">
<SidebarItem isActive={true}>
<div>
<SidebarItemContent isActive={true} icon={<CPU />} label="Models" />
<SidebarItemContent svgStroke isActive={true} icon={<CPU />} label="Models" />
</div>
</SidebarItem>
</li>
<li className="w-full">
<SidebarItem isActive={false}>
<div>
<SidebarItemContent isActive={false} icon={<CPU />} label="Models" />
<SidebarItemContent svgStroke isActive={false} icon={<CPU />} label="Models" />
</div>
</SidebarItem>
</li>
<li className="w-full">
<SidebarItem isActive={false}>
<div>
<SidebarItemContent isActive={false} icon={<CPU />} label="Models" />
<SidebarItemContent svgStroke isActive={false} icon={<CPU />} label="Models" />
</div>
</SidebarItem>
</li>
</SidebarList>
<div style={{ marginTop: "auto" }}>
<SidebarItem>
<div>
<SidebarItemContent isActive={false} icon={<CPU />} label="Models" />
<SidebarItemContent svgStroke isActive={false} icon={<CPU />} label="Models" />
</div>
</SidebarItem>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const SidebarHeader = forwardRef<HTMLDivElement, SidebarHeaderProps>(

const iconClasses = cn(
existingIconClasses,
"w-6 ml-auto shrink-0 h-6 opacity-0 group-hover:opacity-100 duration-300 transition-all"
"ml-auto shrink-0 opacity-0 group-hover:opacity-100 duration-300 transition-all"
);

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Sidebar/SidebarHeader.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const sidebarHeader: Story = {
name: "Sidebar Header",
args: {
title: "ZenML Tenant",
icon: <CloseButton />,
icon: <CloseButton className="w-6 h-6" />,
children: (
<SidebarHeaderImage>
<img src={`https://avatar.vercel.sh/ZenMLTenant?size=32`} />
Expand Down
4 changes: 2 additions & 2 deletions src/components/Sidebar/SidebarItem.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const inactive: Story = {
isActive: false,
children: (
<div>
<SidebarItemContent icon={<CPU />} label="Models" />
<SidebarItemContent svgStroke icon={<CPU />} label="Models" />
</div>
)
}
Expand All @@ -39,7 +39,7 @@ export const active: Story = {
isActive: true,
children: (
<div>
<SidebarItemContent isActive={true} icon={<CPU />} label="Models" />
<SidebarItemContent svgStroke isActive={true} icon={<CPU />} label="Models" />
</div>
)
}
Expand Down

0 comments on commit d541014

Please sign in to comment.