forked from justboil/admin-one-react-tailwind
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
63 changed files
with
1,550 additions
and
573 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
import React from 'react' | ||
import { MenuAsideItem } from '../interfaces' | ||
import AsideMenuLayer from './AsideMenuLayer' | ||
import OverlayLayer from './OverlayLayer' | ||
|
||
type Props = { | ||
menu: MenuAsideItem[] | ||
isAsideMobileExpanded: boolean | ||
isAsideLgActive: boolean | ||
onAsideLgClose: Function | ||
} | ||
|
||
export default function AsideMenu({ | ||
menu, | ||
isAsideMobileExpanded = false, | ||
isAsideLgActive = false, | ||
}) { | ||
...props | ||
}: Props) { | ||
return ( | ||
<> | ||
<AsideMenuLayer | ||
menu={menu} | ||
menu={props.menu} | ||
className={`${isAsideMobileExpanded ? 'left-0' : '-left-60 lg:left-0'} ${ | ||
!isAsideLgActive ? 'lg:hidden xl:flex' : '' | ||
}`} | ||
onAsideLgCloseClick={props.onAsideLgClose} | ||
/> | ||
{isAsideLgActive && <OverlayLayer zIndex="z-30" />} | ||
{isAsideLgActive && <OverlayLayer zIndex="z-30" onClick={props.onAsideLgClose} />} | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
import React, { ReactNode } from 'react' | ||
import React, { Children, cloneElement, ReactNode } from 'react' | ||
|
||
type Props = { | ||
type?: string, | ||
mb?: string, | ||
noWrap: boolean, | ||
type?: string | ||
mb?: string | ||
noWrap?: boolean | ||
children: ReactNode | ||
} | ||
|
||
export default function BaseButtons({ | ||
type = 'justify-start', | ||
mb = '-mb-3', | ||
noWrap = false, | ||
children, | ||
}: Props) { | ||
const parentClass = `flex items-center ${type} ${mb} ${noWrap ? 'flex-nowrap' : 'flex-wrap'}` | ||
|
||
return <div className={parentClass}>{children}</div> | ||
const BaseButtons = ({ type = 'justify-start', mb = '-mb-3', noWrap = false, children }: Props) => { | ||
return ( | ||
<div className={`flex items-center ${type} ${mb} ${noWrap ? 'flex-nowrap' : 'flex-wrap'}`}> | ||
{children} | ||
</div> | ||
) | ||
} | ||
|
||
export default BaseButtons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import React from "react" | ||
import React from 'react' | ||
|
||
type Props = { | ||
navBar?: boolean | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.