From e805c5fade5e49346ed048df1ea6c3f4c0e1799d Mon Sep 17 00:00:00 2001 From: Rupin Khandelwal Date: Mon, 26 Sep 2022 14:01:18 -0500 Subject: [PATCH] Removing commented out code and polish/clean up --- .../patterns/LibraryCards/LibraryGridCard.tsx | 229 ++++-------------- 1 file changed, 47 insertions(+), 182 deletions(-) diff --git a/packages/web/components/patterns/LibraryCards/LibraryGridCard.tsx b/packages/web/components/patterns/LibraryCards/LibraryGridCard.tsx index 0219ebb60..e0d616270 100644 --- a/packages/web/components/patterns/LibraryCards/LibraryGridCard.tsx +++ b/packages/web/components/patterns/LibraryCards/LibraryGridCard.tsx @@ -1,12 +1,8 @@ -import { Box, VStack, HStack, SpanBox } from '../../elements/LayoutPrimitives' -// import { CoverImage } from '../../elements/CoverImage' +import { VStack, HStack, SpanBox } from '../../elements/LayoutPrimitives' import { StyledText } from '../../elements/StyledText' import { removeHTMLTags } from '../ArticleSubtitle' -// import { MoreOptionsIcon } from '../../elements/images/MoreOptionsIcon' import { theme } from '../../tokens/stitches.config' -// import { CardMenu } from '../CardMenu' import { LabelChip } from '../../elements/LabelChip' -// import { ProgressBar } from '../../elements/ProgressBar' import type { LinkedItemCardProps } from './CardTypes' import { ProgressBarVertical } from '../../elements/ProgressBarVertical' @@ -22,184 +18,60 @@ const ellipsisText = { export function LibraryGridCard(props: LinkedItemCardProps): JSX.Element { return ( - <> - {/* { - props.handleAction('showDetail') + alignment="start" + css={{ + width: '100%', }} - > */} - {/* {props.item.image && props.layout !== 'LIST_LAYOUT' && ( - { - ;(e.target as HTMLElement).style.display = 'none' - }} - /> - )} */} - - {/* */} - - - - - {/* */} - {props.item.labels?.map(({ name, color }, index) => ( - - ))} - {/* */} - {props.item.description} - - - - {props.item.author && ( - {removeHTMLTags(props.item.author)} - )} - - - {/* { - // This is here to prevent menu click events from bubbling - // up and causing us to "click" on the link item. - e.stopPropagation() - }} - > - - } - actionHandler={props.handleAction} - /> - */} - - {/* */} - {/* - - {props.item.author && ( - - {removeHTMLTags(props.item.author)} - - )} - {props.originText && ( - <> - - - {props.originText} - - - )} - - */} - - {/* + */} - {/* - {props.item.labels?.map(({ name, color }, index) => ( - - ))} - */} + > + + + + {/* */} + {props.item.labels?.map(({ name, color }, index) => ( + + ))} + {/* */} + {props.item.description} + - {/* */} - + + {props.item.author && ( + {removeHTMLTags(props.item.author)} + )} + + + ) } @@ -216,13 +88,6 @@ function CardTitle(props: CardTitleProps): JSX.Element { ...ellipsisText, fontSize: '18px', textAlign: 'left', - // lineHeight: '1.25', - //overflow: 'hidden', - // display: '-webkit-box', - // WebkitLineClamp: 1, - // WebkitBoxOrient: 'vertical', - // // p: '0 15px 0 0', - // margin: 'auto', }} > {props.title}