2025-04-01 16:15:20 +02:00
|
|
|
import React from 'react'
|
|
|
|
import { controlDesc } from '@freesewing/config'
|
|
|
|
import { BulletIcon } from '@freesewing/react/components/Icon'
|
|
|
|
|
|
|
|
export const ControlScore = ({ control, color = 'base-content' }) =>
|
|
|
|
control ? (
|
2025-04-18 08:07:13 +00:00
|
|
|
<div className={`tw:flex tw:flex-row tw:items-center tw:text-${color}`}>
|
2025-04-01 16:15:20 +02:00
|
|
|
{Object.keys(controlDesc).map((score) => (
|
|
|
|
<BulletIcon
|
|
|
|
fill={control >= score ? true : false}
|
2025-04-18 08:07:13 +00:00
|
|
|
className="tw:w-6 tw:h-6 tw:-ml-1"
|
2025-04-01 16:15:20 +02:00
|
|
|
key={score}
|
|
|
|
/>
|
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
) : null
|