Skip to content

Commit 4860339

Browse files
author
Mathilde Lannes
committed
Update style of "add reference" button
1 parent 94f6057 commit 4860339

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

src/frontend/apps/impress/src/features/docs/doc-editor/components/custom-inline-content/ReferenceInlineContent.tsx

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
33
/* eslint-disable @typescript-eslint/no-unsafe-call */
44
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
5+
import { Icon } from '@/components';
56
import {
67
Block,
78
BlockNoteEditor,
@@ -237,9 +238,25 @@ export const Reference = (
237238
if (!source) {
238239
return (
239240
<span>
240-
<button {...referenceEditFloating.referenceElementProps}>
241-
Add Reference
242-
</button>
241+
<div className="bn-file-block-content-wrapper">
242+
<div
243+
className="bn-add-file-button"
244+
{...referenceEditFloating.referenceElementProps}
245+
style={{
246+
backgroundColor: 'var(--c--theme--colors--greyscale-100)',
247+
color: '#7d797a',
248+
fontSize: '0.9rem',
249+
padding: '0.8rem',
250+
borderRadius: 'var(--c--theme--spacings--3xs)',
251+
display: 'flex',
252+
gap: '0.5rem',
253+
cursor: 'pointer',
254+
}}
255+
>
256+
<Icon iconName="link" $color="#7d797a" />
257+
<p className="bn-add-file-button-text">Add Reference</p>
258+
</div>
259+
</div>
243260
{referenceEditFloating.isOpen && (
244261
<Components.FilePanel.Root
245262
className="bn-panel reference-panel"
@@ -285,7 +302,10 @@ export const Reference = (
285302

286303
return (
287304
<span>
288-
<span {...referenceDetailsFloating.referenceElementProps}>
305+
<span
306+
{...referenceDetailsFloating.referenceElementProps}
307+
style={{ cursor: 'pointer', color: 'var(--mantine-color-anchor)' }}
308+
>
289309
{source.format('citation')}
290310
</span>
291311
{referenceDetailsFloating.isHovered && (

0 commit comments

Comments
 (0)