oxen-website/components/HomeHeroBubble.tsx

40 lines
1.3 KiB
TypeScript
Raw Normal View History

2021-02-12 04:14:34 +01:00
import classNames from 'classnames';
import { useContext } from 'react';
2021-02-19 00:53:06 +01:00
import { useDispatch } from 'react-redux';
2021-02-12 04:14:34 +01:00
import { ScreenContext } from '../contexts/screen';
2021-02-19 00:53:06 +01:00
import { expandSideMenu } from '../state/navigation';
2021-02-12 04:14:34 +01:00
export function HomeHeroBubble() {
2021-02-22 05:12:40 +01:00
const { isMobile, isTablet, isDesktop, isHuge } = useContext(ScreenContext);
2021-02-19 00:53:06 +01:00
const dispatch = useDispatch();
2021-02-12 04:14:34 +01:00
return (
<div
style={{
2021-02-22 06:21:47 +01:00
marginTop:
2021-03-19 06:08:13 +01:00
isMobile || isTablet ? '33px' : isHuge ? '16rem' : 'min(50vh, 20rem)',
2021-02-12 04:14:34 +01:00
}}
2021-02-19 00:53:06 +01:00
onClick={() => dispatch(expandSideMenu())}
2021-02-22 05:12:40 +01:00
className={classNames(
'absolute z-40 px-4 tablet:px-6 duration-300 w-full h-full tablet:w-auto tablet:h-auto flex justify-center items-center tablet:flex-none',
2021-02-22 05:12:40 +01:00
!isDesktop && 'cursor-pointer',
)}
2021-02-12 04:14:34 +01:00
>
<div
className={classNames(
'px-4 py-2 leading-tight text-base desktop:text-xl border rounded-lg bg-opacity-90 border-secondary bg-alt text-primary animate-float',
2021-02-23 05:36:09 +01:00
// isMobile ? 'text-base' : 'text-xl',
2021-02-12 04:14:34 +01:00
)}
>
2021-02-22 06:21:47 +01:00
<p className="mb-1 text-xs desktop:text-base text-secondary">OXEN</p>
2021-05-07 07:38:58 +02:00
<h1>
Welcome to Oxen.
<br />
We know you have questions;
<br /> here are the answers.
</h1>
2021-02-12 04:14:34 +01:00
</div>
</div>
);
}