Skip to content
Open
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions components/CounterLabel/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@
pointer-events: none;
box-sizing: border-box;
padding: 0 var(--spacing-xs);
min-width: 20px;
min-width: 16px;
display: inline-flex;
align-items: center;
justify-content: center;
flex-flow: row;
flex: none;
height: auto;

&.variant-neutral {
--color: var(--fg-neutral);
Expand All @@ -39,7 +36,10 @@
}

span {
font: var(--t-body-xxs-600);
font-size: var(--body-micro-11, 11px);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In design it's clearly xss-500, so use it.

font-style: normal;
font-weight: var(--font-weight-medium-500, 500);
line-height: var(--line-height-sm-14, 14px);
color: inherit;
text-align: center;
}
Expand Down
9 changes: 7 additions & 2 deletions components/Tabs/Tab.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import clsx from 'clsx';
import { ThemeVariable } from '../../types';
import { Icon } from '../Icon';
import type { TabProps } from './types';

export const Tab = ({ onClick, title, active }: TabProps) => {
export const Tab = ({ onClick, title, active, icon }: TabProps) => {
return (
<div
className={clsx('tab', {
Expand All @@ -10,7 +12,10 @@ export const Tab = ({ onClick, title, active }: TabProps) => {
onClick={onClick}
>
<div className="line"></div>
<p className="title">{title}</p>
<div className="title">
{icon && <Icon icon={icon} size={16} staticColor={ThemeVariable.FgAttention} />}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be explicit bool check, use isPresent

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bcs Tab is shared component nad not rly for one occasion it would make more sense to pass IconProps instead of only iconKindValue

{title}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

render text it in p or span tag.

</div>
</div>
);
};
4 changes: 4 additions & 0 deletions components/Tabs/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
font: var(--t-body-sm-500);
color: var(--color);
text-align: center;
display: flex;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restrict row flow to no-wrap

align-items: center;
justify-content: center;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flex-start

column-gap: var(--spacing-xs);

@include animate(color);
}
Expand Down
3 changes: 3 additions & 0 deletions components/Tabs/types.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import type { IconKindValue } from '../Icon';

export type TabProps = TabsItem;

export interface TabsItem {
title: string;
active?: boolean;
hidden?: boolean;
onClick: () => void;
icon?: IconKindValue;
}

export interface TabsProps {
Expand Down