amirmoghi3.ir/components/SpecialistBar/index.tsx

27 lines
518 B
TypeScript
Raw Normal View History

2022-02-28 14:06:38 +03:30
2022-03-19 04:24:44 +03:30
type Props = {
title: string,
percent: number,
2022-02-28 14:06:38 +03:30
2022-03-19 04:24:44 +03:30
}
2022-02-28 14:06:38 +03:30
2022-03-19 04:24:44 +03:30
export const LinearSpeacialistBar = ({ title, percent }: Props) => {
2022-02-28 14:06:38 +03:30
return (
<div>
<span className="text-secondary text-sm opacity-75">
{title}
</span>
<div className="h-2 w-full bg-dark-primary rounded-md z-0">
</div>
<div className={`relative -top-[8px] h-2 rounded-md bg-gold z-10`} style={{ width: percent + "%" }}>
</div>
</div>
)
}