Skip to content

Commit

Permalink
feat(#70): add green colored circle
Browse files Browse the repository at this point in the history
  • Loading branch information
mari1912 committed Jul 16, 2024
1 parent f6fe62c commit fb51955
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
10 changes: 8 additions & 2 deletions dashboard/src/components/ColoredCircle/ColoredCircle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@ import { ComponentType } from '../ListingComponentItem/ListingComponentItem';
interface IColoredCircle {
quantity: number;
type: ComponentType;
className?: string;
}

const ColoredCircle = ({ quantity, type }: IColoredCircle): JSX.Element => {
const ColoredCircle = ({
quantity,
type,
className,
}: IColoredCircle): JSX.Element => {
const backgroundColor =
type === ComponentType.Error ? 'bg-lightRed' : 'bg-yellow';
type === ComponentType.Error ? 'bg-lightRed' : 'bg-lightGreen';
return (
<div
className={classNames(
backgroundColor,
'rounded-full text-black h-6 min-w-6 flex justify-center px-1',
className,
)}
>
<span className="text-sm">{quantity}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface IListingComponentItem {
export enum ComponentType {
Warning,
Error,
Success,
}

const ListingComponentItem = ({
Expand Down
3 changes: 3 additions & 0 deletions dashboard/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ module.exports = {
"black": '#000000',
"lightRed": '#FFBBBB',
"yellow": '#FFD27C',
"lightGreen": '#C9FADA',
"green": '#1DDF5D',
"red": '#E15739'
}
},
},
Expand Down

0 comments on commit fb51955

Please sign in to comment.