Fix mobile layout for outift URLs no-op message

Copied styles from the similar layout in the bulk converter tool! The status will flush to the right of the field header on desktop, and move below the input on mobile.
This commit is contained in:
Emi Matchu 2021-06-01 17:35:29 -07:00
parent 9191a5a65a
commit e1d6981274

View file

@ -193,19 +193,25 @@ function SingleImageConverter() {
<FormErrorMessage>{parseError?.message || null}</FormErrorMessage> <FormErrorMessage>{parseError?.message || null}</FormErrorMessage>
</FormControl> </FormControl>
<FormControl gridArea="output"> <FormControl gridArea="output">
<Flex marginBottom="2"> <Grid
<FormLabel fontSize="sm" margin="0"> templateAreas={{
base: `
"header"
"input"
"status"
`,
md: `
"header status"
"input input"
`,
}}
alignItems="center"
rowGap="2"
>
<FormLabel gridArea="header" fontSize="sm" margin="0">
Then, use this new URL in your layouts instead: Then, use this new URL in your layouts instead:
</FormLabel> </FormLabel>
<Box flex="1 0 auto" width="2" /> <InputGroup gridArea="input" size="sm">
{isAlreadyConverted && (
<Flex alignItems="center" fontSize="sm" opacity="0.8">
<CheckIcon marginRight="1.5" />
<Box>{parseError.message}</Box>
</Flex>
)}
</Flex>
<InputGroup size="sm">
<Input <Input
placeholder="https://impress-outfit-images.openneo.net/outfits/123456789/600.png" placeholder="https://impress-outfit-images.openneo.net/outfits/123456789/600.png"
isReadOnly isReadOnly
@ -224,6 +230,15 @@ function SingleImageConverter() {
</InputRightElement> </InputRightElement>
)} )}
</InputGroup> </InputGroup>
<Box gridArea="status" textAlign="right" justifySelf="end">
{isAlreadyConverted && (
<Flex alignItems="center" fontSize="sm" opacity="0.8">
<CheckIcon marginRight="1.5" />
<Box>{parseError.message}</Box>
</Flex>
)}
</Box>
</Grid>
</FormControl> </FormControl>
<AspectRatio <AspectRatio
gridArea="preview" gridArea="preview"