import styled from 'styled-components'; import { useCallback } from 'react'; import { useTranslation } from '@labelu/i18n'; // import { useAnnotator } from '@/context'; import { useTool } from '@/context/tool.context'; import Slider from './Slider'; import { ReactComponent as StrokeWidthIcon } from './assets/stroke-width.svg'; import { ReactComponent as OpacityStrokeIcon } from './assets/opacity-stroke.svg'; import { ReactComponent as OpacityFillIcon } from './assets/opacity-fill.svg'; export const PropertyWrapper = styled.div` position: relative; width: 200px; display: flex; flex-direction: column; gap: 1.25rem; `; const Wrapper = styled.div` display: flex; flex-direction: column; gap: 2.5rem; padding: 1rem; `; const SliderWrapper = styled.div` padding: 0 0.75rem; `; export const TitleWrapper = styled.div` display: flex; align-items: center; gap: 0.5rem; `; export default function ToolStyle() { const { engine } = useTool(); // @ts-ignore const { t } = useTranslation(); const handleStrokeWidthChange = useCallback( (value: number) => { engine.strokeWidth = value; }, [engine], ); const handleStrokeOpacityChange = useCallback( (value: number) => { engine.strokeOpacity = value; }, [engine], ); const handleFillOpacityChange = useCallback( (value: number) => { engine.fillOpacity = value; }, [engine], ); return ( {t('strokeWidth')} {t('strokeOpacity')} {t('fillOpacity')} ); }