Create SideBar with Children props
This commit is contained in:
parent
cc4c5eac21
commit
dc6b5e704f
|
@ -1,32 +1,14 @@
|
||||||
import React from 'react';
|
import React, { ReactNode } from 'react';
|
||||||
import { NavLink } from 'react-router-dom';
|
|
||||||
import '@/assets/css/sidebar.css';
|
import '@/assets/css/sidebar.css';
|
||||||
|
|
||||||
const Sidebar = () => {
|
type ParentProps = {
|
||||||
|
children: ReactNode;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ({ children }: Omit<ParentProps, 'render'>) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className='sidebar'>
|
<div className='sidebar'>{children}</div>
|
||||||
<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>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Sidebar;
|
|
||||||
|
|
Loading…
Reference in New Issue