Skip to content

Commit

Permalink
fix(List): fix ListItem icon size
Browse files Browse the repository at this point in the history
  • Loading branch information
mainframev committed Dec 1, 2023
1 parent e7f47d2 commit 6afd3b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/orbit-components/src/List/ListItem/index.tsx
Expand Up @@ -12,7 +12,7 @@ const ListItem = ({ label, children, icon = <CircleSmall />, dataTest }: Props)
className="orbit-list-item font-base mb-xxs flex last:m-0 last-of-type:m-0"
>
{icon && (
<div className="orbit-list-item-icon me-xs [&>svg]:h-icon-small [&>svg]:w-icon-small [&>.orbit-carrier-logo]:h-icon-small [&>.orbit-carrier-logo]:w-icon-small [&>.orbit-carrier-logo>img]:h-icon-small [&>.orbit-carrier-logo>img]:w-icon-small flex flex-none items-center">
<div className="orbit-list-item-icon me-xs [&>.orbit-carrier-logo]:h-icon-small [&>.orbit-carrier-logo]:w-icon-small [&>.orbit-carrier-logo>img]:h-icon-small [&>.orbit-carrier-logo>img]:w-icon-small flex flex-none items-center">
{icon}
</div>
)}
Expand Down
7 changes: 4 additions & 3 deletions packages/orbit-components/src/List/index.tsx
Expand Up @@ -8,11 +8,12 @@ import type { Props } from "./types";
import { spaceAfterClasses } from "../common/tailwind";

const sizeTokens = {
[SIZES.SMALL]: "text-small leading-small [&_.orbit-list-item-icon]:h-icon-small",
[SIZES.SMALL]:
"text-small leading-small [&_.orbit-list-item-icon>svg]:h-icon-small [&_.orbit-list-item-icon>svg]:w-icon-small",
[SIZES.NORMAL]:
"text-normal leading-normal [&_.orbit-list-item-icon]:h-icon-medium [&_.orbit-list-item-label]:text-small",
"text-normal leading-normal [&_.orbit-list-item-icon>svg]:h-icon-medium [&_.orbit-list-item-icon>svg]:w-icon-medium [&_.orbit-list-item-label]:text-small",
[SIZES.LARGE]:
"text-large leading-large [&_.orbit-list-item-icon]:h-icon-large [&_.orbit-list-item-label]:text-normal",
"text-large leading-large [&_.orbit-list-item-icon>svg]:h-icon-large [&_.orbit-list-item-icon>svg]:w-icon-large [&_.orbit-list-item-label]:text-normal",
};

const typeTokens = {
Expand Down

0 comments on commit 6afd3b9

Please sign in to comment.