Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
refactor: change name and usage props in cards & rm unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
oxiqod committed Aug 1, 2023
1 parent 4905606 commit 9a8f11d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const Cards = () => {
widthCategory={{ _: 80, standard: 104, ultra: 148 }}
сategory={intl.formatMessage({ id: 'courses.card.education' })}
gap={{ _: 104, standard: 214, wide: 356, ultra: 222 }}
waves
image='/waves.png'
widthContent={{ _: 303, standard: 694, ultra: 945 }}
title={intl.formatMessage({ id: 'courses.card.frontend-engineer' })}
description={intl.formatMessage({
Expand All @@ -47,7 +47,7 @@ export const Cards = () => {
widthCategory={{ _: 87, standard: 112, ultra: 160 }}
сategory={intl.formatMessage({ id: 'courses.card.mini-cours' })}
gap={{ _: 49, standard: 56, wide: 356, ultra: 222 }}
waves
image='/waves.png'
widthContent={{ _: 303, standard: 694, ultra: 945 }}
title={intl.formatMessage({ id: 'courses.card.basics-development' })}
description={intl.formatMessage({
Expand Down
8 changes: 2 additions & 6 deletions ui/card/src/card.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export const Card: FC<CardProps> = ({ ...props }) => {
const [hover, hoverProps] = useHover()

return (
// <Background backgroundColor='waves' backgroundPosition='500px 100px' backgroundRepeat='no-repeat' display={{_:'none',standard:'none',wide:'flex',ultra:'flex'}} width='100%'>

<Box
width='100%'
{...hoverProps}
Expand All @@ -25,9 +23,9 @@ export const Card: FC<CardProps> = ({ ...props }) => {
boxShadow={hover ? 'normalBlurDarkPurple' : ''}
position='relative'
>
{props.waves ? (
{props.image ? (
<Image
src='/waves.png'
src={props.image}
position='absolute'
right={34}
top={40}
Expand Down Expand Up @@ -59,7 +57,6 @@ export const Card: FC<CardProps> = ({ ...props }) => {

<Layout flexBasis={{ _: 8, standard: 12, ultra: 18 }} />
</Box>

<Layout flexBasis={props.gap} />
<Box flexDirection='column' maxWidth={props.widthContent}>
<Box>
Expand All @@ -82,6 +79,5 @@ export const Card: FC<CardProps> = ({ ...props }) => {
<Layout flexBasis={[16, 40]} />
</Background>
</Box>
// </Background>
)
}
2 changes: 1 addition & 1 deletion ui/card/src/card.interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export interface CardProps {
widthCategory?: object | number | number[]
сategory?: string
gap?: object | number | number[]
waves?: boolean
image?: string
widthContent?: object | number | number[]
title?: string
description?: string
Expand Down
6 changes: 1 addition & 5 deletions ui/link/src/link.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,4 @@ import { createBaseStyles } from '@atls-ui-parts/link'

import { Text } from '@ui/text'

export const BaseLink = styled(Text.withComponent('a'))<{ active: boolean }>(createBaseStyles(), ({
active,
}) => ({
color: active ? 'blue' : 'black',
}))
export const BaseLink = styled(Text.withComponent('a'))(createBaseStyles())

0 comments on commit 9a8f11d

Please sign in to comment.