(embedBubble) Enable variable embed height

This commit is contained in:
Baptiste Arnaud
2023-02-19 09:53:57 +01:00
parent d22cc45a97
commit 621cd58244
14 changed files with 226 additions and 198 deletions

View File

@@ -1,4 +1,4 @@
import { FormLabel, Stack } from '@chakra-ui/react'
import { FormLabel, HStack, Stack, Text } from '@chakra-ui/react'
import { CodeEditor } from '@/components/CodeEditor'
import { FileInputOptions, Variable } from 'models'
import React from 'react'
@@ -48,16 +48,16 @@ export const FileInputSettings = ({ options, onOptionsChange }: Props) => {
initialValue={options.isMultipleAllowed}
onCheckChange={handleMultipleFilesChange}
/>
<Stack>
<FormLabel mb="0" htmlFor="limit">
Size limit (MB):
</FormLabel>
<HStack>
<SmartNumberInput
id="limit"
value={options.sizeLimit ?? 10}
label={'Size limit:'}
defaultValue={options.sizeLimit ?? 10}
onValueChange={handleSizeLimitChange}
withVariableButton={false}
/>
</Stack>
<Text>MB</Text>
</HStack>
<Stack>
<FormLabel mb="0">Placeholder:</FormLabel>
<CodeEditor

View File

@@ -1,7 +1,7 @@
import { Input, SmartNumberInput } from '@/components/inputs'
import { VariableSearchInput } from '@/components/VariableSearchInput'
import { removeUndefinedFields } from '@/utils/helpers'
import { FormLabel, HStack, Stack } from '@chakra-ui/react'
import { FormLabel, Stack } from '@chakra-ui/react'
import { NumberInputOptions, Variable } from 'models'
import React from 'react'
@@ -50,36 +50,24 @@ export const NumberInputSettingsBody = ({
onChange={handleButtonLabelChange}
/>
</Stack>
<HStack justifyContent="space-between">
<FormLabel mb="0" htmlFor="min">
Min:
</FormLabel>
<SmartNumberInput
id="min"
value={options.min}
onValueChange={handleMinChange}
/>
</HStack>
<HStack justifyContent="space-between">
<FormLabel mb="0" htmlFor="max">
Max:
</FormLabel>
<SmartNumberInput
id="max"
value={options.max}
onValueChange={handleMaxChange}
/>
</HStack>
<HStack justifyContent="space-between">
<FormLabel mb="0" htmlFor="step">
Step:
</FormLabel>
<SmartNumberInput
id="step"
value={options.step}
onValueChange={handleBlockChange}
/>
</HStack>
<SmartNumberInput
label="Min:"
defaultValue={options.min}
onValueChange={handleMinChange}
withVariableButton={false}
/>
<SmartNumberInput
label="Max:"
defaultValue={options.max}
onValueChange={handleMaxChange}
withVariableButton={false}
/>
<SmartNumberInput
label="Step:"
defaultValue={options.step}
onValueChange={handleBlockChange}
withVariableButton={false}
/>
<Stack>
<FormLabel mb="0" htmlFor="variable">
Save answer in a variable: