fix: Gap between icon picker and title

This commit is contained in:
Tom Moor
2024-07-02 20:28:37 -04:00
parent b84851a4c3
commit c8e67b969d

View File

@@ -8,7 +8,7 @@ import styled from "styled-components";
import breakpoint from "styled-components-breakpoint";
import isMarkdown from "@shared/editor/lib/isMarkdown";
import normalizePastedMarkdown from "@shared/editor/lib/markdown/normalize";
import { s } from "@shared/styles";
import { extraArea, s } from "@shared/styles";
import { light } from "@shared/styles/theme";
import {
getCurrentDateAsString,
@@ -256,7 +256,7 @@ const DocumentTitle = React.forwardRef(function _DocumentTitle(
{can.update && !readOnly ? (
<IconWrapper align="center" justify="center" dir={dir}>
<React.Suspense fallback={fallbackIcon}>
<IconPicker
<StyledIconPicker
icon={icon ?? null}
color={color}
size={40}
@@ -283,6 +283,11 @@ type TitleProps = {
$iconPickerIsOpen: boolean;
};
// Extra area prevents gap between icon and beginning of title
const StyledIconPicker = styled(IconPicker)`
${extraArea(8)}
`;
const Title = styled(ContentEditable)<TitleProps>`
position: relative;
line-height: ${lineHeight};