Skip to content

Commit c0ad223

Browse files
committed
fixup! ✨(frontend) create page from dropdown search
1 parent ab931b4 commit c0ad223

File tree

1 file changed

+47
-28
lines changed
  • src/frontend/apps/impress/src/features/docs/doc-editor/components/custom-inline-content/Interlinking

1 file changed

+47
-28
lines changed

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

Lines changed: 47 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import { css } from 'styled-components';
1010

1111
import {
1212
Box,
13-
BoxButton,
1413
Card,
1514
Icon,
1615
QuickSearch,
16+
QuickSearchGroup,
1717
QuickSearchItemContent,
1818
Text,
1919
} from '@/components';
@@ -265,33 +265,52 @@ export const SearchPage = ({
265265
/>
266266
)}
267267
/>
268-
<Box
269-
$css={css`
270-
border-top: 1px solid var(--c--theme--colors--greyscale-200);
271-
`}
272-
>
273-
<BoxButton
274-
$direction="row"
275-
$gap="0.4rem"
276-
$align="center"
277-
$padding={{ vertical: '0.5rem', horizontal: '0.3rem' }}
278-
$css={css`
279-
&:hover {
280-
background-color: var(--c--theme--colors--greyscale-100);
281-
}
282-
`}
283-
onClick={createChildDoc}
284-
$hasTransition={false}
285-
>
286-
<AddPageIcon />
287-
<Text
288-
$size="14px"
289-
$color="var(--c--theme--colors--greyscale-1000)"
290-
>
291-
{t('New sub-doc')}
292-
</Text>
293-
</BoxButton>
294-
</Box>
268+
<QuickSearchGroup
269+
group={{
270+
groupName: '',
271+
elements: [],
272+
endActions: [
273+
{
274+
onSelect: createChildDoc,
275+
content: (
276+
<Box
277+
$css={css`
278+
border-top: 1px solid
279+
var(--c--theme--colors--greyscale-200);
280+
`}
281+
$width="100%"
282+
>
283+
<Box
284+
$direction="row"
285+
$gap="0.4rem"
286+
$align="center"
287+
$padding={{
288+
vertical: '0.5rem',
289+
horizontal: '0.3rem',
290+
}}
291+
$css={css`
292+
&:hover {
293+
background-color: var(
294+
--c--theme--colors--greyscale-100
295+
);
296+
}
297+
`}
298+
>
299+
<AddPageIcon />
300+
<Text
301+
$size="14px"
302+
$color="var(--c--theme--colors--greyscale-1000)"
303+
contentEditable={false}
304+
>
305+
{t('New sub-doc')}
306+
</Text>
307+
</Box>
308+
</Box>
309+
),
310+
},
311+
],
312+
}}
313+
/>
295314
</Card>
296315
</QuickSearch>
297316
</Box>

0 commit comments

Comments
 (0)