UNPKG

@zergo0/react-filerobot-image-editor

Version:

React component version of filerobot image editor (FIE).

1 lines 745 B
import React from"react";import restrictNumber from"../../../utils/restrictNumber";import ColorInput from"../ColorInput";import{StyledSpacedOptionFields}from"./AnnotationOptions.styled";import Slider from"../Slider";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var MIN_PERCENTANGE=0,MAX_PERCENTANGE=100,StrokeFields=function(a){var b=a.annotation,c=a.updateAnnotation,d=b.stroke,e=b.strokeWidth;return _jsxs(StyledSpacedOptionFields,{children:[_jsx(Slider,{annotation:"px",onChange:function changeStrokeWidth(a){c({strokeWidth:restrictNumber(a,MIN_PERCENTANGE,MAX_PERCENTANGE)})},value:e,noMargin:!0}),_jsx(ColorInput,{color:d,onChange:function changeStrokeColor(a){c({stroke:a})},colorFor:"stroke"})]})};export default StrokeFields;