Skip to content

Commit

Permalink
fix: styling (#1482)
Browse files Browse the repository at this point in the history
* fix(components): add isNested

* fix(editable): fix boxshadow beign on box

* fix(cards): remove full wdith

* fix(infopic): full width input

---------

Co-authored-by: seaerchin <[email protected]>
  • Loading branch information
seaerchin and seaerchin authored Sep 7, 2023
1 parent 91a6fbc commit 7185abc
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 18 deletions.
1 change: 0 additions & 1 deletion src/layouts/components/ContactUs/ContactCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ export const ContactCard = ({

<Button
variant="clear"
w="100%"
id={`contacts-${index}`}
onClick={() => onDelete(`contacts-${index}`, "contact information")}
alignSelf="center"
Expand Down
1 change: 0 additions & 1 deletion src/layouts/components/ContactUs/LocationCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ export const LocationCard = ({

<Button
variant="clear"
w="100%"
id={`locations-${index}`}
onClick={() => onDelete(`locations-${index}`, "location")}
alignSelf="center"
Expand Down
3 changes: 1 addition & 2 deletions src/layouts/components/Editable/Editable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,12 @@ const DraggableAccordionItem = ({
borderRadius={isNested ? "0.375rem" : "0.5rem"}
{...draggableProvided.draggableProps}
ref={draggableProvided.innerRef}
boxShadow="sm"
boxShadow={isNested ? "" : "sm"}
position="relative"
>
{({ isExpanded }) => (
<Box
borderRadius={isNested ? "0.375rem" : "0.5rem"}
boxShadow={isNested ? "" : "sm"}
bgColor={
isExpanded && isNested
? "base.canvas.brand-subtle"
Expand Down
1 change: 1 addition & 0 deletions src/layouts/components/Homepage/HeroDropdownSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const HeroDropdownSection = ({
isInvalid={_.some(
errors.dropdownElems[dropdownOptionIndex]
)}
isNested
>
<Editable.Section>
<FormControl
Expand Down
1 change: 1 addition & 0 deletions src/layouts/components/Homepage/HeroHighlightSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export const HeroHighlightSection = ({
draggableId={`highlight-${highlightIndex}-draggable`}
index={highlightIndex}
isInvalid={_.some(errors.highlights[highlightIndex])}
isNested
>
<Editable.Section>
<FormControl
Expand Down
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
1 change: 1 addition & 0 deletions src/layouts/components/NavBar/GroupMenuBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const GroupMenuBody = ({
index={sublinkIndex}
title={sublink.title}
isInvalid={_.some(errors.sublinks[sublinkIndex])}
isNested
>
<Editable.Section mt="-0.5rem">
<FormControl
Expand Down

0 comments on commit 7185abc

Please sign in to comment.