Skip to content

Commit 96cb0f8

Browse files
committed
💄(frontend) update callout styles
Updated the callout block styles, centered the emoji and aligned the text to be in the center of the block. Signed-off-by: ZouicheOmar <[email protected]>
1 parent 83f2b38 commit 96cb0f8

File tree

1 file changed

+21
-13
lines changed
  • src/frontend/apps/impress/src/features/docs/doc-editor/components/custom-blocks

1 file changed

+21
-13
lines changed

src/frontend/apps/impress/src/features/docs/doc-editor/components/custom-blocks/CalloutBlock.tsx

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ export const CalloutBlock = createReactBlockSpec(
7070
}
7171
`}
7272
$align="center"
73+
$justify="center"
7374
$height="28px"
7475
$width="28px"
76+
$minWidth="28px"
7577
$radius="4px"
7678
>
7779
{block.props.emoji}
@@ -85,7 +87,13 @@ export const CalloutBlock = createReactBlockSpec(
8587
onEmojiSelect={onEmojiSelect}
8688
/>
8789
)}
88-
<Box as="p" className="inline-content" ref={contentRef} />
90+
<Box as="p" className="inline-content" ref={contentRef}
91+
$css={css`
92+
& > div {
93+
padding-top: 2px;
94+
}
95+
`}
96+
/>
8997
</Box>
9098
);
9199
},
@@ -97,19 +105,19 @@ export const getCalloutReactSlashMenuItems = (
97105
t: TFunction<'translation', undefined>,
98106
group: string,
99107
) => [
100-
{
101-
title: t('Callout'),
102-
onItemClick: () => {
103-
insertOrUpdateBlock(editor, {
104-
type: 'callout',
105-
});
108+
{
109+
title: t('Callout'),
110+
onItemClick: () => {
111+
insertOrUpdateBlock(editor, {
112+
type: 'callout',
113+
});
114+
},
115+
aliases: ['callout', 'encadré', 'hervorhebung', 'benadrukken'],
116+
group,
117+
icon: <Icon iconName="lightbulb" $size="18px" />,
118+
subtext: t('Add a callout block'),
106119
},
107-
aliases: ['callout', 'encadré', 'hervorhebung', 'benadrukken'],
108-
group,
109-
icon: <Icon iconName="lightbulb" $size="18px" />,
110-
subtext: t('Add a callout block'),
111-
},
112-
];
120+
];
113121

114122
export const getCalloutFormattingToolbarItems = (
115123
t: TFunction<'translation', undefined>,

0 commit comments

Comments
 (0)