import { linkClasses, Chevron } from 'shared/components/navigation/primary.js' import PercentOption from 'shared/components/workbench/inputs/design-option-percentage' import { formatMm, formatPercentage, optionType } from 'shared/utils.js' const values = { pct: props => { const val = (typeof props.gist?.options?.[props.option] === 'undefined') ? props.pattern.config.options[props.option].pct/100 : props.gist.options[props.option] return ( {formatPercentage(val)} {props.pattern.config.options[props.option]?.toAbs ? ' | ' +formatMm(props.pattern.config.options[props.option]?.toAbs(val, props.gist)) : null } ) } } const Tmp = props =>

not yet

const inputs = { pct: PercentOption, bool: Tmp, count: Tmp, deg: Tmp, list: Tmp, mm: Tmp, constant: Tmp, } const Option = props => { const type = optionType(props.pattern.config.options[props.option]) const Input = inputs[type] const Value = values[type] return (
  • <>° { props.app.t(`options.${props.pattern.config.name}.${props.option}.title`) }
  • ) } export default Option