diff --git a/src/app/assets/svg/icons/close.svg b/src/app/assets/svg/icons/close.svg new file mode 100644 index 00000000..fa7ebb9d --- /dev/null +++ b/src/app/assets/svg/icons/close.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/app/components/shared/Sidebar/Sidebar.js b/src/app/components/shared/Sidebar/Sidebar.js index 7b20b1d4..096fc369 100644 --- a/src/app/components/shared/Sidebar/Sidebar.js +++ b/src/app/components/shared/Sidebar/Sidebar.js @@ -1,8 +1,9 @@ // @flow strict -import React, { Fragment } from 'react'; +import React, { Fragment, useEffect } from 'react'; import type { Node } from 'react'; import Icon from '@/components/base/Icon/Icon'; +import { KEYBOARD } from '@/constants'; import './Sidebar.scss'; @@ -20,42 +21,54 @@ const Sidebar = ({ onClose = () => {}, title = 'sidebar', children, -}: PropsType) => ( - - { isOpen ? ( -
{}} - role="presentation" - onClick={onClose} - className="sidebar__overlay" - />) : null } - - -); - -// Sidebar.defaultProps = { -// side: 'left', -// }; +
+

{ title }

+ {}} + onClick={onClose} + > + + +
+
+ {children} +
+ + + ) : null; +}; export default Sidebar;