mirror of
https://github.com/System-End/site.git
synced 2026-04-20 00:25:19 +00:00
♻️ Refactor
This commit is contained in:
parent
3341e42240
commit
a4b53ea7a2
2 changed files with 10 additions and 10 deletions
|
|
@ -1,8 +1,7 @@
|
|||
import React, { useState } from 'react'
|
||||
import React from 'react'
|
||||
import { Box, Button, Text } from 'theme-ui'
|
||||
import ReactTooltip from 'react-tooltip'
|
||||
import Icon from '@hackclub/icons'
|
||||
/** @jsxImportSource theme-ui */
|
||||
|
||||
export default function Buttons({
|
||||
children,
|
||||
|
|
@ -13,7 +12,7 @@ export default function Buttons({
|
|||
primary,
|
||||
...props
|
||||
}) {
|
||||
let fontWeight = primary != null ? '700' : '400'
|
||||
let fontWeight = primary ? '700' : '400'
|
||||
|
||||
return (
|
||||
<Box
|
||||
|
|
@ -34,12 +33,12 @@ export default function Buttons({
|
|||
alignItems: 'center',
|
||||
color: 'inherit',
|
||||
px: '3',
|
||||
py: primary != null ? '12px' : 2,
|
||||
py: primary ? '12px' : 2,
|
||||
width: 'fit-content',
|
||||
textTransform: 'none',
|
||||
fontWeight: '400',
|
||||
fontSize:
|
||||
primary != null ? ['18px', '20px', '22px'] : [1, '16px', '18px'],
|
||||
primary ? ['18px', '20px', '22px'] : [1, '16px', '18px'],
|
||||
backdropFilter: 'blur(2px)',
|
||||
fontWeight: fontWeight
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,8 @@ const CardModel = ({
|
|||
{text || 'Happening now'}
|
||||
</Box>
|
||||
)}
|
||||
{github_link != null ? (
|
||||
|
||||
{github_link && (
|
||||
<Box>
|
||||
{position === 'bottom' ? (
|
||||
<Flex
|
||||
|
|
@ -90,7 +91,7 @@ const CardModel = ({
|
|||
}}
|
||||
/>
|
||||
</Link>
|
||||
{stars != null ? (
|
||||
{stars ? (
|
||||
<Text as="h2">
|
||||
⭐️ <Comma>{stars}</Comma>
|
||||
</Text>
|
||||
|
|
@ -109,7 +110,7 @@ const CardModel = ({
|
|||
// flexDirection: ['column', 'row', 'row']
|
||||
}}
|
||||
>
|
||||
{stars != null ? (
|
||||
{stars ? (
|
||||
<Text as="h2" sx={{ fontSize: ['20px', '24px', '28px'] }}>
|
||||
⭐️ <Comma>{stars}</Comma>
|
||||
</Text>
|
||||
|
|
@ -132,9 +133,8 @@ const CardModel = ({
|
|||
</Flex>
|
||||
)}
|
||||
</Box>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
|
||||
{image && (
|
||||
<Image
|
||||
src={image}
|
||||
|
|
@ -148,6 +148,7 @@ const CardModel = ({
|
|||
mt: ['-24px', '-32px', '-32px', '-32px'],
|
||||
zIndex: 0
|
||||
}}
|
||||
alt=''
|
||||
/>
|
||||
)}
|
||||
{children}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue