Create SideBar with Children props
This commit is contained in:
parent
cc4c5eac21
commit
dc6b5e704f
|
@ -1,32 +1,14 @@
|
|||
import React from 'react';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import React, { ReactNode } from 'react';
|
||||
import '@/assets/css/sidebar.css';
|
||||
|
||||
const Sidebar = () => {
|
||||
type ParentProps = {
|
||||
children: ReactNode;
|
||||
};
|
||||
|
||||
export default ({ children }: Omit<ParentProps, 'render'>) => {
|
||||
return (
|
||||
<>
|
||||
<div className='sidebar'>
|
||||
<NavLink to='/'>
|
||||
Home <i className='bx bxs-home-heart' />
|
||||
</NavLink>
|
||||
|
||||
<NavLink to='/resources'>
|
||||
Resources <i className='bx bx-list-ul' />
|
||||
</NavLink>
|
||||
|
||||
<NavLink className='router-link-active' to='' v-if='isEditor'>
|
||||
Editor <i className='bx bx-edit-alt' />
|
||||
</NavLink>
|
||||
|
||||
<a href='https://github.com/Angelillo15' target='_blank' rel='noreferrer'>
|
||||
GitHub <i className='bx bxl-github' />
|
||||
</a>
|
||||
<a href='https://discord.nookure.com' target='_blank' rel='noreferrer'>
|
||||
Discord <i className='bx bxl-discord-alt' />
|
||||
</a>
|
||||
</div>
|
||||
<div className='sidebar'>{children}</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Sidebar;
|
||||
|
|
Loading…
Reference in New Issue