Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(List): fix ListItem icon size #4172

Merged
merged 2 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/orbit-components/src/List/ListItem/index.tsx
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading