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: SelectButton styles #2419

Merged
merged 5 commits into from
Oct 4, 2023
Merged
Changes from all commits
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
24 changes: 8 additions & 16 deletions workspaces/core/src/selectButton/SelectButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import useSelectButtonContext from './private/utils/useSelectButtonContext';
import mergeClassnames from '../mergeClassnames/mergeClassnames';
import ControlsChevronDownSmall from '../private/icons/ControlsChevronDownSmall';
import ControlsCloseSmall from '../private/icons/ControlsCloseSmall';
import Tag from '../tag/Tag';

const SelectButtonRoot = forwardRef(
(
Expand Down Expand Up @@ -167,23 +168,14 @@ const Chip = ({ children, onClear }: ChipProps) => {
[onClear]
);
return (
<span
onClick={cliclHandler}
className={mergeClassnames(
'chip bg-bulma text-trunks flex items-center justify-center rounded-moon-s-xs cursor-pointer',
size === 'sm' ? 'text-moon-12 h-4 px-0.5' : 'text-moon-14 h-6 px-1'
)}
<Tag
size={size === 'sm' ? '2xs' : 'xs'}
iconRight={
<ControlsCloseSmall onClick={cliclHandler} className="cursor-pointer" />
}
>
<span className={mergeClassnames(size === 'sm' ? 'px-0.5' : 'px-1')}>
{children}
</span>
<ControlsCloseSmall
className={mergeClassnames(
'text-trunks',
size === 'sm' ? 'text-moon-12' : 'text-moon-14'
)}
/>
</span>
{children}
</Tag>
);
};

Expand Down
Loading