Skip to content

Commit 60393e9

Browse files
author
Mathilde Lannes
committed
Add reference button should not be full width
1 parent 6135638 commit 60393e9

File tree

1 file changed

+18
-21
lines changed

1 file changed

+18
-21
lines changed

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

Lines changed: 18 additions & 21 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+
56
import {
67
Block,
78
BlockNoteEditor,
@@ -29,8 +30,6 @@ import {
2930
} from '@floating-ui/react';
3031
import { useCallback, useEffect, useState } from 'react';
3132

32-
import { Icon } from '@/components';
33-
3433
import { bibliographyBlockConfig } from '../custom-blocks';
3534

3635
export const referenceInlineContentConfig = {
@@ -239,25 +238,23 @@ export const Reference = (
239238
if (!source) {
240239
return (
241240
<span>
242-
<div className="bn-file-block-content-wrapper">
243-
<div
244-
className="bn-add-file-button"
245-
{...referenceEditFloating.referenceElementProps}
246-
style={{
247-
backgroundColor: 'var(--c--theme--colors--greyscale-100)',
248-
color: '#7d797a',
249-
fontSize: '0.9rem',
250-
padding: '0.8rem',
251-
borderRadius: 'var(--c--theme--spacings--3xs)',
252-
display: 'flex',
253-
gap: '0.5rem',
254-
cursor: 'pointer',
255-
}}
256-
>
257-
<Icon iconName="link" $color="#7d797a" />
258-
<p className="bn-add-file-button-text">Add Reference</p>
259-
</div>
260-
</div>
241+
<button
242+
{...referenceEditFloating.referenceElementProps}
243+
style={{
244+
backgroundColor: 'var(--c--theme--colors--greyscale-100)',
245+
color: '#7d797a',
246+
fontSize: '0.9rem',
247+
paddingTop: '0.4rem',
248+
paddingBottom: '0.4rem',
249+
paddingLeft: '0.6rem',
250+
paddingRight: '0.6rem',
251+
borderRadius: 'var(--c--theme--spacings--3xs)',
252+
border: 'none',
253+
cursor: 'pointer',
254+
}}
255+
>
256+
<p>Add Reference</p>
257+
</button>
261258
{referenceEditFloating.isOpen && (
262259
<Components.FilePanel.Root
263260
className="bn-panel reference-panel"

0 commit comments

Comments
 (0)