1
0
Fork 0
freesewing/packages/react/components/Control/index.mjs
joostdecock c8808695e5 wip: Bunch of changes for v4
From the top of my head (but I'll write this up later):

- We keep the info about the designs in the design
- We use a new about.json file for this
- The auto-generated data.mjs file is no more
- Linedrawings we use in the design picker use the front
- Linedrawings should respect square aspect ration
- Migrated components to use the 'tw-' prefic for tailwind CSS classes
  to avoid conflicts with docusaurus styles
2024-12-26 18:33:49 +01:00

16 lines
527 B
JavaScript

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