Slide 14
Slide 14 text
export const DynamicField = ({ field, values, onChange }: Props) => {
const commonProps = {
label: field.label,
description: field.description,
}
switch (field.fieldConfig.case) {
case 'textField': {
const value = values.get(field.fieldId)?.value
return (
onChange(
field.fieldId,
new SettingValue({ value: { case: 'stringValue', value: newValue } }),
)
}
/>
)
}
case 'sliderField': {
… 14
FieldTypeごとに分岐
それぞれのComponentに
Responseをそのまま渡す
各Componentの中では
Stylingのみのロジック
frontendでの変換