File tree Expand file tree Collapse file tree
src/frontend/apps/impress/src/features/docs/doc-tree/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import { useRef, useState } from 'react';
99import { useTranslation } from 'react-i18next' ;
1010import { css } from 'styled-components' ;
1111
12- import { Box , BoxButton , Icon , Text } from '@/components' ;
12+ import { Box , Icon , StyledLink , Text } from '@/components' ;
1313import { useCunninghamTheme } from '@/cunningham' ;
1414import {
1515 Doc ,
@@ -24,6 +24,7 @@ import SubPageIcon from './../assets/sub-page-logo.svg';
2424import { DocTreeItemActions } from './DocTreeItemActions' ;
2525
2626const ItemTextCss = css `
27+ font-weight : normal;
2728 overflow : hidden;
2829 text-overflow : ellipsis;
2930 white-space : initial;
@@ -216,27 +217,25 @@ export const DocSubPageItem = (props: TreeViewNodeProps<Doc>) => {
216217 buttonOptionRef = { buttonOptionRef }
217218 />
218219 </ Box >
219- < BoxButton
220+ < StyledLink
221+ href = { `/docs/${ doc . id } ` }
220222 onClick = { ( e ) => {
221223 e . stopPropagation ( ) ;
224+ e . preventDefault ( ) ;
222225 handleActivate ( ) ;
223226 } }
224227 tabIndex = { - 1 }
225- $width = "100%"
226- $direction = "row"
227- $gap = { spacingsTokens [ 'xs' ] }
228- $align = "center"
229- $minHeight = "24px"
230228 data-testid = { `doc-sub-page-item-${ doc . id } ` }
231229 aria-label = { `${ t ( 'Open document {{title}}' , { title : docTitle } ) } ` }
232230 $css = { css `
233- text-align : left;
234- min-width : 0 ;
231+ width : 100% ;
235232 ` }
236233 >
237234 < Box
238235 $direction = "row"
239236 $align = "center"
237+ $gap = { spacingsTokens [ 'xs' ] }
238+ $minHeight = "24px"
240239 $css = { css `
241240 display : flex;
242241 flex-direction : row;
@@ -259,7 +258,7 @@ export const DocSubPageItem = (props: TreeViewNodeProps<Doc>) => {
259258 />
260259 ) }
261260 </ Box >
262- </ BoxButton >
261+ </ StyledLink >
263262 </ TreeViewItem >
264263 </ Box >
265264 ) ;
You can’t perform that action at this time.
0 commit comments