Skip to content

Commit

Permalink
fix(infopic): full width input
Browse files Browse the repository at this point in the history
  • Loading branch information
seaerchin committed Sep 7, 2023
1 parent 3404617 commit 232c353
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions src/layouts/components/Homepage/InfopicBody.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FormControl } from "@chakra-ui/react"
import { FormControl, Box } from "@chakra-ui/react"
import {
Button,
FormErrorMessage,
Expand Down Expand Up @@ -96,19 +96,21 @@ export const InfopicBody = ({
/>
<FormErrorMessage>{errors.url}</FormErrorMessage>
</FormControl>
<FormContext
hasError={!!errors.image}
onFieldChange={onChange}
isRequired
>
<FormTitle>Image</FormTitle>
<FormFieldMedia
value={image}
id={`section-${index}-infopic-image`}
inlineButtonText="Browse"
/>
<FormError>{errors.image}</FormError>
</FormContext>
<Box w="100%">
<FormContext
hasError={!!errors.image}
onFieldChange={onChange}
isRequired
>
<FormTitle>Image</FormTitle>
<FormFieldMedia
value={image}
id={`section-${index}-infopic-image`}
inlineButtonText="Browse"
/>
<FormError>{errors.image}</FormError>
</FormContext>
</Box>
<FormControl isRequired isInvalid={!!errors.alt}>
<FormLabel>Alt text</FormLabel>
<Input
Expand Down

0 comments on commit 232c353

Please sign in to comment.