✨ (theme) Add container theme options: border, shadow, filter (#1436)
Closes #1332
This commit is contained in:
@@ -35,10 +35,16 @@ const colorsSelection: `#${string}`[] = [
|
||||
type Props = {
|
||||
value?: string
|
||||
defaultValue?: string
|
||||
isDisabled?: boolean
|
||||
onColorChange: (color: string) => void
|
||||
}
|
||||
|
||||
export const ColorPicker = ({ value, defaultValue, onColorChange }: Props) => {
|
||||
export const ColorPicker = ({
|
||||
value,
|
||||
defaultValue,
|
||||
isDisabled,
|
||||
onColorChange,
|
||||
}: Props) => {
|
||||
const { t } = useTranslate()
|
||||
const [color, setColor] = useState(defaultValue ?? '')
|
||||
const displayedValue = value ?? color
|
||||
@@ -63,6 +69,7 @@ export const ColorPicker = ({ value, defaultValue, onColorChange }: Props) => {
|
||||
padding={0}
|
||||
borderRadius={3}
|
||||
borderWidth={1}
|
||||
isDisabled={isDisabled}
|
||||
>
|
||||
<Box rounded="full" boxSize="14px" bgColor={displayedValue} />
|
||||
</Button>
|
||||
|
||||
@@ -141,6 +141,8 @@ export const UnsplashPicker = ({ imageSize, onImageSelect }: Props) => {
|
||||
fetchNewImages(query, 0)
|
||||
}}
|
||||
withVariableButton={false}
|
||||
debounceTimeout={500}
|
||||
forceDebounce
|
||||
/>
|
||||
<Link
|
||||
isExternal
|
||||
|
||||
@@ -24,6 +24,7 @@ import { env } from '@typebot.io/env'
|
||||
import { MoreInfoTooltip } from '../MoreInfoTooltip'
|
||||
|
||||
export type TextInputProps = {
|
||||
forceDebounce?: boolean
|
||||
defaultValue?: string
|
||||
onChange?: (value: string) => void
|
||||
debounceTimeout?: number
|
||||
@@ -62,6 +63,7 @@ export const TextInput = forwardRef(function TextInput(
|
||||
autoComplete,
|
||||
isDisabled,
|
||||
autoFocus,
|
||||
forceDebounce,
|
||||
onChange: _onChange,
|
||||
onFocus,
|
||||
onKeyUp,
|
||||
@@ -83,7 +85,7 @@ export const TextInput = forwardRef(function TextInput(
|
||||
const onChange = useDebouncedCallback(
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
_onChange ?? (() => {}),
|
||||
env.NEXT_PUBLIC_E2E_TEST ? 0 : debounceTimeout
|
||||
env.NEXT_PUBLIC_E2E_TEST && !forceDebounce ? 0 : debounceTimeout
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user