🚸 Add a better select input

Also improves other inputs behavior
This commit is contained in:
Baptiste Arnaud
2023-03-03 09:01:11 +01:00
parent a66bfca1ec
commit cc7d7285e5
94 changed files with 1251 additions and 1109 deletions

View File

@@ -1,6 +1,6 @@
import { Button, Flex, HStack, Stack, Text } from '@chakra-ui/react'
import { AudioBubbleContent } from 'models'
import { Input } from '@/components/inputs'
import { TextInput } from '@/components/inputs'
import { useState } from 'react'
import { UploadButton } from '@/components/ImageUploadContent/UploadButton'
@@ -52,7 +52,7 @@ export const AudioBubbleForm = ({
)}
{currentTab === 'link' && (
<>
<Input
<TextInput
placeholder="Paste the audio file link..."
defaultValue={content.url ?? ''}
onChange={submit}

View File

@@ -1,4 +1,4 @@
import { Input, SmartNumberInput } from '@/components/inputs'
import { TextInput, NumberInput } from '@/components/inputs'
import { HStack, Stack, Text } from '@chakra-ui/react'
import { EmbedBubbleContent } from 'models'
import { sanitizeUrl } from 'utils'
@@ -22,7 +22,7 @@ export const EmbedUploadContent = ({ content, onSubmit }: Props) => {
return (
<Stack p="2" spacing={6}>
<Stack>
<Input
<TextInput
placeholder="Paste the link or code..."
defaultValue={content?.url ?? ''}
onChange={handleUrlChange}
@@ -33,7 +33,7 @@ export const EmbedUploadContent = ({ content, onSubmit }: Props) => {
</Stack>
<HStack>
<SmartNumberInput
<NumberInput
label="Height:"
defaultValue={content?.height}
onValueChange={handleHeightChange}

View File

@@ -19,7 +19,7 @@ import { defaultTextBubbleContent, TextBubbleContent, Variable } from 'models'
import { ReactEditor } from 'slate-react'
import { serializeHtml } from '@udecode/plate-serializer-html'
import { parseHtmlStringToPlainText } from '../../utils'
import { VariableSearchInput } from '@/components/VariableSearchInput'
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
import { colors } from '@/lib/theme'
import { useOutsideClick } from '@/hooks/useOutsideClick'

View File

@@ -4,7 +4,7 @@ import urlParser from 'js-video-url-parser/lib/base'
import 'js-video-url-parser/lib/provider/vimeo'
import 'js-video-url-parser/lib/provider/youtube'
import { isDefined } from 'utils'
import { Input } from '@/components/inputs'
import { TextInput } from '@/components/inputs'
type Props = {
content?: VideoBubbleContent
@@ -24,7 +24,7 @@ export const VideoUploadContent = ({ content, onSubmit }: Props) => {
}
return (
<Stack p="2">
<Input
<TextInput
placeholder="Paste the video link..."
defaultValue={content?.url ?? ''}
onChange={handleUrlChange}