1
0
Fork 0

chore(shared): Removed ribbon

This commit is contained in:
joostdecock 2023-09-04 11:56:20 +02:00
parent b1f3ee4cfd
commit 9ef8be1d29
4 changed files with 21 additions and 51 deletions

View file

@ -1,30 +1,20 @@
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Hooks
import { useContext } from 'react'
import { Ribbon } from 'shared/components/ribbon.mjs'
export const HeaderWrapper = ({ show, children }) => {
const { loading } = useContext(LoadingStatusContext)
return (
<header
className={`
fixed bottom-0 md:bottom-auto md:top-0 left-0
bg-neutral
w-full
z-30
transition-transform
duration-300 ease-in-out
${show || loading ? '' : 'translate-y-36 md:-translate-y-36'}
drop-shadow-xl
`}
>
{' '}
{children}
<Ribbon />
</header>
)
}
export const HeaderWrapper = ({ show, children }) => (
<header
className={`
fixed bottom-0 md:bottom-auto md:top-0 left-0
bg-neutral
w-full
z-30
transition-transform
duration-300 ease-in-out
${show ? '' : 'translate-y-36 md:-translate-y-36'}
drop-shadow-xl
`}
>
{' '}
{children}
</header>
)
// can't use string interpolation or tailwind won't account for these classes
const shownHeaderClasses = {