Merged PR 315: ErgonomieTreeView

Affichage fonctionnelle sous forme de toolbar vertical, comme dans les IDE

Related work items: #7976
This commit is contained in:
Carl Fuchs 2023-02-07 14:25:53 +00:00 committed by Eric Nguyen
parent acb5ba2d82
commit 8a99ef4cfd
13 changed files with 240 additions and 133 deletions

View file

@ -0,0 +1,23 @@
import * as React from 'react';
import './ToggleSideBar.scss';
interface IToggleSidebarProps {
title: string
checked: boolean
onChange: (newValue: boolean) => void
}
export function ToggleSideBar({ title, checked, onChange }: IToggleSidebarProps): JSX.Element {
return (
<div className={`${(checked ? 'bg-slate-400 hover:bg-slate-500' : 'bg-slate-300 hover:bg-slate-400')}`}>
<button
className={'w-full py-2'}
type='button'
onClick={() => onChange(!checked)}
>
<p className='text-vertical'>{title}
</p>
</button>
</div>
);
}