Add SVG Sidebar
This commit is contained in:
parent
7e74be6d3b
commit
17aa2b0961
3 changed files with 45 additions and 11 deletions
22
src/Components/SVGSidebar/SVGSidebar.tsx
Normal file
22
src/Components/SVGSidebar/SVGSidebar.tsx
Normal file
|
@ -0,0 +1,22 @@
|
|||
import * as React from 'react';
|
||||
|
||||
interface ISVGSidebarProps {
|
||||
isOpen: boolean;
|
||||
onClick: () => void;
|
||||
}
|
||||
|
||||
export class SVGSidebar extends React.Component<ISVGSidebarProps> {
|
||||
public render() {
|
||||
const isOpenClasses = this.props.isOpen ? 'right-0' : '-right-64';
|
||||
return (
|
||||
<div className={`fixed bg-slate-400 text-white transition-all h-screen w-64 overflow-y-auto z-10 ${isOpenClasses}`}>
|
||||
<div className='w-full h-auto p-4 flex justify-start' onClick={this.props.onClick}>
|
||||
<button className='text-lg'>×</button>
|
||||
</div>
|
||||
<div className='bg-slate-500 sidebar-row'>
|
||||
Liste des éléments
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue