Merged PR 315: ErgonomieTreeView
Affichage fonctionnelle sous forme de toolbar vertical, comme dans les IDE Related work items: #7976
This commit is contained in:
parent
acb5ba2d82
commit
8a99ef4cfd
13 changed files with 240 additions and 133 deletions
23
src/Components/Sidebar/ToggleSideBar/ToggleSideBar.tsx
Normal file
23
src/Components/Sidebar/ToggleSideBar/ToggleSideBar.tsx
Normal 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>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue