2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 12:06:44 +00:00

added some visual improvements (#9342)

* added some visual improvements

* fix lint

* Undo changes to sample icons for now

* use primary color
This commit is contained in:
Lukas 2025-03-19 22:24:35 +01:00 committed by GitHub
parent cfd83a3d62
commit 3260d94369
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 21 additions and 2 deletions

View File

@ -14,8 +14,8 @@ export const ApiIcon = ({ name: _name, size = 22 }: ApiIconProps) => {
const unicode = icon ? String.fromCodePoint(Number.parseInt(icon, 16)) : ''; const unicode = icon ? String.fromCodePoint(Number.parseInt(icon, 16)) : '';
if (!unicode) { if (!unicode && _name !== '') {
console.warn(`ApiIcon not found: ${_name}`); console.warn(`ApiIcon not found: '${_name}'`);
} }
return ( return (

View File

@ -168,6 +168,7 @@ export default function NavigationTree({
<Anchor <Anchor
onClick={(event: any) => follow(payload.node, event)} onClick={(event: any) => follow(payload.node, event)}
aria-label={`nav-tree-item-${payload.node.value}`} aria-label={`nav-tree-item-${payload.node.value}`}
c='var(--mantine-color-text)'
> >
{payload.node.label} {payload.node.label}
</Anchor> </Anchor>

View File

@ -0,0 +1,10 @@
import { style } from '@vanilla-extract/css';
import { vars } from '../../theme';
export const selectedPanelTab = style({
selectors: {
'&[data-active]': {
background: vars.colors.primaryColors.light
}
}
});

View File

@ -37,6 +37,7 @@ import { useLocalState } from '../../states/LocalState';
import { Boundary } from '../Boundary'; import { Boundary } from '../Boundary';
import { StylishText } from '../items/StylishText'; import { StylishText } from '../items/StylishText';
import type { PanelType } from '../panels/Panel'; import type { PanelType } from '../panels/Panel';
import * as classes from './PanelGroup.css';
/** /**
* Set of properties which define a panel group: * Set of properties which define a panel group:
@ -161,6 +162,7 @@ function BasePanelGroup({
orientation='vertical' orientation='vertical'
keepMounted={false} keepMounted={false}
aria-label={`panel-group-${pageKey}`} aria-label={`panel-group-${pageKey}`}
classNames={{ tab: classes.selectedPanelTab }}
> >
<Tabs.List justify='left' aria-label={`panel-tabs-${pageKey}`}> <Tabs.List justify='left' aria-label={`panel-tabs-${pageKey}`}>
{allPanels.map( {allPanels.map(

View File

@ -109,6 +109,12 @@ export const tab = style({
':hover': { ':hover': {
[vars.lightSelector]: { backgroundColor: vars.colors.gray[1] }, [vars.lightSelector]: { backgroundColor: vars.colors.gray[1] },
[vars.darkSelector]: { backgroundColor: vars.colors.dark[5] } [vars.darkSelector]: { backgroundColor: vars.colors.dark[5] }
},
selectors: {
'&[data-active]': {
backgroundColor: vars.colors.primaryColors.light
}
} }
}); });