From b8f24e7be5746931f94b08e4b4f5eae4cf03baad Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 6 Mar 2023 11:24:45 +0800 Subject: [PATCH] Consolidate styles for list and grid cards --- .../patterns/LibraryCards/LibraryGridCard.tsx | 90 ++++--------------- .../patterns/LibraryCards/LibraryListCard.tsx | 82 ++++------------- 2 files changed, 37 insertions(+), 135 deletions(-) diff --git a/packages/web/components/patterns/LibraryCards/LibraryGridCard.tsx b/packages/web/components/patterns/LibraryCards/LibraryGridCard.tsx index fef912678..40ef887c2 100644 --- a/packages/web/components/patterns/LibraryCards/LibraryGridCard.tsx +++ b/packages/web/components/patterns/LibraryCards/LibraryGridCard.tsx @@ -8,6 +8,13 @@ import { useState } from 'react' import { DotsThreeVertical } from 'phosphor-react' import Link from 'next/link' import { CardMenu } from '../CardMenu' +import { + AuthorInfoStyle, + DescriptionStyle, + MenuStyle, + MetaStyle, + TitleStyle, +} from './LibraryCardStyles' dayjs.extend(relativeTime) @@ -117,11 +124,7 @@ export function LibraryGridCard(props: LinkedItemCardProps): JSX.Element { > {props.item.title} - {props.item.description} + - {props.item.description} - - - - {props.item.author} - {props.item.author && originText && ' | '} - - {originText} - + {props.item.author} + {props.item.author && originText && ' | '} + + {originText} - + - + {timeAgo(props.item.savedAt)} {` `} @@ -117,20 +114,8 @@ export function LibraryListCard(props: LinkedItemCardProps): JSX.Element { - {props.item.title} + - {props.item.title} - - - - {props.item.author} - {props.item.author && originText && ' | '} - - {originText} - + {props.item.author} + {props.item.author && originText && ' | '} + + {originText} - +