Skip to content

Commit

Permalink
feat(StatusTag): allow New tag
Browse files Browse the repository at this point in the history
  • Loading branch information
YossiSaadi committed Dec 17, 2024
1 parent e2f1851 commit 68c727d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const Types: Story = {
<Flex direction={Flex.directions.COLUMN} gap={Flex.gaps.MEDIUM} align={Flex.align.START}>
<StatusTag type="alpha" />
<StatusTag type="beta" />
<StatusTag type="new" />
<StatusTag type="deprecated" />
</Flex>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
border-color: var(--sb-brand-color);
}

&.new {
color: var(--sb-positive-color);
border-color: var(--sb-positive-color);
}

&.deprecated {
color: var(--sb-negative-color);
border-color: var(--sb-negative-color);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import { FC } from 'react';
import styles from './status-tag.module.scss';
import cx from 'classnames';

export type StatusTagType = 'alpha' | 'beta' | 'deprecated';
export type StatusTagType = 'alpha' | 'beta' | 'new' | 'deprecated';

interface StatusTagProps {
type: StatusTagType;
}

const StatusTag: FC<StatusTagProps> = ({ type }) => {
console.log('type', type);
return <label className={cx(styles.statusTag, styles[type])}>{type}</label>;
};

Expand Down

0 comments on commit 68c727d

Please sign in to comment.