Skip to content

Commit

Permalink
fix: section header left padding
Browse files Browse the repository at this point in the history
  • Loading branch information
devcatalin committed Jan 21, 2022
1 parent 73d21e6 commit 8c5c9db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/components/molecules/SectionRenderer/SectionHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ function SectionHeader(props: SectionHeaderProps) {
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
<S.NameContainer isHovered={isHovered} $hasCustomNameDisplay={Boolean(NameDisplay.Component)}>
<S.NameContainer
isHovered={isHovered}
isCheckable={Boolean(sectionBlueprint.builder?.makeCheckable)}
$hasCustomNameDisplay={Boolean(NameDisplay.Component)}
>
{sectionInstance.checkable &&
sectionInstance.isInitialized &&
(sectionBlueprint.customization?.isCheckVisibleOnHover
Expand Down
3 changes: 2 additions & 1 deletion src/components/molecules/SectionRenderer/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Colors, {FontColors} from '@styles/Colors';

type NameContainerProps = {
isHovered?: boolean;
isCheckable?: boolean;
$hasCustomNameDisplay: boolean;
};

Expand All @@ -27,7 +28,7 @@ export const NameContainer = styled.span<NameContainerProps>`
display: flex;
align-items: center;
width: 100%;
padding-left: 24px;
${props => props.isCheckable && `padding-left: 24px;`}
${props => !props.isHovered && 'padding-right: 30px;'}
${props => props.$hasCustomNameDisplay && 'padding: 0;'}
`;
Expand Down

0 comments on commit 8c5c9db

Please sign in to comment.