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