File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { Details } from '../../Details';
88import { FloatingActions , floatingHoverStyles } from './FloatingActions' ;
99import { ErrorLook } from '../../ErrorLook' ;
1010import { LoaderInline } from '../../Loader' ;
11+ import { getIconForClass } from '../../../views/FolderPage/iconMap' ;
1112
1213interface ResourceSideBarProps {
1314 subject : string ;
@@ -38,6 +39,9 @@ export function ResourceSideBar({
3839 const [ subResources ] = useArray ( resource , urls . properties . subResources ) ;
3940 const hasSubResources = subResources . length > 0 ;
4041
42+ const [ classType ] = useString ( resource , urls . properties . isA ) ;
43+ const Icon = getIconForClass ( classType ! ) ;
44+
4145 const handleDetailsToggle = useCallback ( ( state : boolean ) => {
4246 setOpen ( state ) ;
4347 } , [ ] ) ;
@@ -101,7 +105,10 @@ export function ResourceSideBar({
101105 title = { description }
102106 ref = { spanRef }
103107 >
104- { title }
108+ < TextWrapper >
109+ < Icon />
110+ { title }
111+ </ TextWrapper >
105112 </ SideBarItem >
106113 </ Title >
107114 < FloatingActions subject = { subject } />
@@ -137,3 +144,14 @@ const Title = styled(AtomicLink)<TitleProps>`
137144 overflow: hidden;
138145 white-space: nowrap;
139146` ;
147+
148+ const TextWrapper = styled . span `
149+ display: inline-flex;
150+ align-items: center;
151+ gap: 0.4rem;
152+
153+ svg {
154+ /* color: ${ p => p . theme . colors . text } ; */
155+ font-size: 0.8em;
156+ }
157+ ` ;
You can’t perform that action at this time.
0 commit comments