diff --git a/src/components/editor/Editor.tsx b/src/components/editor/Editor.tsx index ffd757faf0..6e1054f575 100644 --- a/src/components/editor/Editor.tsx +++ b/src/components/editor/Editor.tsx @@ -64,7 +64,7 @@ const Editor: React.FC = () => { selectedComponent, ) let panelCode = await generatePanel(components, fileName) - const response = await API.post('/save-file', { + await API.post('/save-file', { codeBody: code, ocTsxBody: ocTsxCode, jsonBody: components, diff --git a/src/components/inspector/controls/FormControl.tsx b/src/components/inspector/controls/FormControl.tsx index 3ed1d786cb..8b98f9f09c 100644 --- a/src/components/inspector/controls/FormControl.tsx +++ b/src/components/inspector/controls/FormControl.tsx @@ -5,6 +5,7 @@ import { Grid, Box, } from '@chakra-ui/react' +import ParamSelector from '~custom-components/paramSelector' type FormControlPropType = { label: ReactNode @@ -37,6 +38,8 @@ const FormControl: React.FC = ({ > {label} + + { return ( <> + {Object.keys(props.themeColors).map(colorName => props.gradient ? ( diff --git a/src/components/inspector/controls/TextControl.tsx b/src/components/inspector/controls/TextControl.tsx index d9b8cb96c3..d941754c7e 100644 --- a/src/components/inspector/controls/TextControl.tsx +++ b/src/components/inspector/controls/TextControl.tsx @@ -21,11 +21,9 @@ const TextControl: React.FC = ({ }) => { const { setValueFromEvent } = useForm() const value = usePropsSelector(name) - return ( { } }} > - - ) => - setQuickProps({ ...quickProps, name: event.target.value }) - } - /> + ) => + setQuickProps({ ...quickProps, name: event.target.value }) + } + /> + { onChange={(event: ChangeEvent) => setQuickProps({ ...quickProps, value: event.target.value }) } - ml={1} /> + + + + + + + + {params?.map((param: string) => ( + + setQuickProps({ ...quickProps, value: param }) + } + > + {param} + + ))} + + + + - {customParams && ( + {customParams?.length ? ( Name @@ -204,6 +183,8 @@ const ParametersPanel = () => { Value + ) : ( + <> )} {customParams?.map((paramsName: ParametersType, i: any) => ( { - + { return ( <> - + setValue('opacity', value / 100)} diff --git a/src/components/inspector/panels/styles/FlexPanel.tsx b/src/components/inspector/panels/styles/FlexPanel.tsx index 0fe2142d35..067001af33 100644 --- a/src/components/inspector/panels/styles/FlexPanel.tsx +++ b/src/components/inspector/panels/styles/FlexPanel.tsx @@ -13,7 +13,7 @@ const FlexPanel = () => { return ( <> - + - + - +