-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(components): migrate atoms to tailwindcss
- Loading branch information
1 parent
1acfcc7
commit fad5904
Showing
28 changed files
with
201 additions
and
502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
import { clsx } from 'clsx' | ||
|
||
import S from './styles.module.scss' | ||
import type { BadgeProps, Colors } from './types' | ||
|
||
import type { BadgeProps } from './types' | ||
const colors = (color: Colors) => ({ | ||
'bg-secondary': color === 'green', | ||
'text-white bg-grey': color === 'grey', | ||
'text-white bg-cherry': color === 'red' | ||
}) | ||
|
||
export const Badge = ({ label, color = 'gray' }: BadgeProps) => ( | ||
<span className={clsx(S.badge, S[`badge_colors--${color}`])}>{label}</span> | ||
export const Badge = ({ label, color = 'grey' }: BadgeProps) => ( | ||
<span | ||
className={clsx( | ||
'flex max-h-fit max-w-fit flex-nowrap whitespace-nowrap rounded-20 px-6 py-1 text-12 font-600 uppercase', | ||
colors(color) | ||
)} | ||
> | ||
{label} | ||
</span> | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
export type Colors = 'green' | 'grey' | 'red' | ||
|
||
export type BadgeProps = { | ||
label: string | ||
color?: 'green' | 'gray' | 'red' | ||
color?: Colors | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
src/components/atoms/ContainerCardControlRender/styles.module.scss
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.