mirror of
https://github.com/System-End/site.git
synced 2026-04-19 22:05:11 +00:00
* Added moonshot card * Revert "Added moonshot card" This reverts commit 1b0eecd0c19c6e68c62a7f2acc13070c3f77e32e. * excising lockfiles * fixing merge issue * add referral type --------- Co-authored-by: Hafsa <116444403+slippyishappy@users.noreply.github.com>
88 lines
2.1 KiB
JavaScript
88 lines
2.1 KiB
JavaScript
import React from 'react'
|
|
import { Box, Button, Text } from 'theme-ui'
|
|
import ReactTooltip from '../../react-tooltip'
|
|
import Icon from '@hackclub/icons'
|
|
|
|
export default function Buttons({
|
|
children,
|
|
icon,
|
|
customIcon,
|
|
id,
|
|
content,
|
|
link,
|
|
primary,
|
|
overrideColor,
|
|
zIndex,
|
|
...props
|
|
}) {
|
|
let fontWeight = primary ? '700' : '400'
|
|
|
|
return (
|
|
<Box
|
|
as="button"
|
|
sx={{ background: 'transparent', border: 'none', color: 'white', zIndex: zIndex ||0 }}
|
|
py={1}
|
|
|
|
>
|
|
<Button
|
|
data-place="right"
|
|
data-for={id}
|
|
data-effect="solid"
|
|
data-tip
|
|
sx={{
|
|
background: primary || overrideColor || 'rgb(255, 255, 255, 0.3)',
|
|
borderRadius: '100px',
|
|
border: 'none',
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
color: 'inherit',
|
|
px: '3',
|
|
py: primary ? '12px' : 2,
|
|
width: 'fit-content',
|
|
textTransform: 'none',
|
|
fontWeight: '400',
|
|
fontSize: primary ? ['18px', '20px', '22px'] : [1, '16px', '18px'],
|
|
backdropFilter: 'blur(2px)',
|
|
fontWeight: fontWeight,
|
|
zIndex: 999,
|
|
}}
|
|
as="a"
|
|
href={link || '/'}
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
{...props}
|
|
>
|
|
{customIcon ? (
|
|
<Box sx={{ marginRight: 2, display: 'flex', alignItems: 'center' }}>
|
|
{customIcon}
|
|
</Box>
|
|
) : (
|
|
<Icon
|
|
glyph={icon || 'plus-fill'}
|
|
sx={{ color: 'inherit', marginRight: 2 }}
|
|
size={24}
|
|
mr={2}
|
|
/>
|
|
)}
|
|
<Text sx={{ fontFamily: 'Phantom Sans', textAlign: 'left' }}>
|
|
{children}
|
|
</Text>
|
|
</Button>
|
|
<ReactTooltip
|
|
id={id}
|
|
delayShow={150}
|
|
delayHide={100}
|
|
delayUpdate={500}
|
|
clickable={true}
|
|
getContent={() => {
|
|
return null
|
|
}}
|
|
className="custom-tooltip-radius custom-arrow-radius"
|
|
arrowRadius="2"
|
|
tooltipRadius="10"
|
|
>
|
|
{content}
|
|
</ReactTooltip>
|
|
</Box>
|
|
)
|
|
}
|