Remove unused
This commit is contained in:
@ -1,96 +0,0 @@
|
||||
import { styled } from '@stitches/react'
|
||||
import { Fragment, useMemo } from 'react'
|
||||
import { LabelChip } from '../../elements/LabelChip'
|
||||
import {
|
||||
VStack,
|
||||
HStack,
|
||||
Blockquote,
|
||||
SpanBox,
|
||||
Box,
|
||||
} from '../../elements/LayoutPrimitives'
|
||||
import { StyledMark, StyledText } from '../../elements/StyledText'
|
||||
import { HighlightView } from '../HighlightView'
|
||||
import { LinkedItemCardAction, LinkedItemCardProps } from './CardTypes'
|
||||
import { TitleStyle } from './LibraryCardStyles'
|
||||
|
||||
export interface HighlightItemCardProps
|
||||
extends Pick<LinkedItemCardProps, 'item'> {
|
||||
handleAction: (action: LinkedItemCardAction) => void
|
||||
}
|
||||
|
||||
export const PreviewImage = styled('img', {
|
||||
objectFit: 'cover',
|
||||
cursor: 'pointer',
|
||||
})
|
||||
|
||||
const StyledQuote = styled(Blockquote, {
|
||||
margin: '0px 0px 0px 0px',
|
||||
fontSize: '16px',
|
||||
lineHeight: '27px',
|
||||
color: '$grayText',
|
||||
paddingLeft: '20px',
|
||||
// borderRadius: '8px',
|
||||
borderLeft: '2px solid $omnivoreCtaYellow',
|
||||
})
|
||||
|
||||
export function HighlightItemCard(props: HighlightItemCardProps): JSX.Element {
|
||||
const lines = useMemo(() => props.item.quote.split('\n'), [props.item.quote])
|
||||
return (
|
||||
<VStack
|
||||
css={{
|
||||
p: '20px',
|
||||
gap: '20px',
|
||||
height: '100%',
|
||||
width: '320px',
|
||||
borderRadius: '8px',
|
||||
cursor: 'pointer',
|
||||
wordBreak: 'break-word',
|
||||
overflow: 'clip',
|
||||
border: '1px solid $thBorderColor',
|
||||
borderBottom: 'none',
|
||||
boxShadow: '0px 3px 11px rgba(32, 31, 29, 0.04)',
|
||||
bg: '$grayBg',
|
||||
'&:focus': {
|
||||
bg: '$grayBgActive',
|
||||
},
|
||||
'&:hover': {
|
||||
bg: '$grayBgActive',
|
||||
},
|
||||
}}
|
||||
alignment="start"
|
||||
distribution="start"
|
||||
onClick={() => {
|
||||
props.handleAction('showDetail')
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
css={{
|
||||
...TitleStyle,
|
||||
height: '42px',
|
||||
}}
|
||||
>
|
||||
{props.item.title}
|
||||
</Box>
|
||||
<StyledQuote>
|
||||
<SpanBox css={{ p: '1px', borderRadius: '2px' }}>
|
||||
{lines.map((line: string, index: number) => (
|
||||
<Fragment key={index}>
|
||||
{line}
|
||||
{index !== lines.length - 1 && (
|
||||
<>
|
||||
<br />
|
||||
<br />
|
||||
</>
|
||||
)}
|
||||
</Fragment>
|
||||
))}
|
||||
</SpanBox>
|
||||
<Box css={{ display: 'block', pt: '16px' }}>
|
||||
{props.item.labels?.map(({ name, color }, index) => (
|
||||
<LabelChip key={index} text={name || ''} color={color} />
|
||||
))}
|
||||
</Box>
|
||||
</StyledQuote>
|
||||
</VStack>
|
||||
)
|
||||
}
|
||||
@ -17,7 +17,6 @@ import {
|
||||
libraryListCommands,
|
||||
highlightBarKeyboardCommands,
|
||||
} from '../../lib/keyboardShortcuts/navigationShortcuts'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
type KeyboardShortcutListModalProps = {
|
||||
onOpenChange: (open: boolean) => void
|
||||
@ -26,8 +25,6 @@ type KeyboardShortcutListModalProps = {
|
||||
export function KeyboardShortcutListModal(
|
||||
props: KeyboardShortcutListModalProps
|
||||
): JSX.Element {
|
||||
const router = useRouter()
|
||||
|
||||
return (
|
||||
<ModalRoot defaultOpen onOpenChange={props.onOpenChange}>
|
||||
<ModalOverlay />
|
||||
|
||||
@ -4,10 +4,7 @@ import { DotsThreeVertical } from 'phosphor-react'
|
||||
import { Fragment, useMemo, useState } from 'react'
|
||||
import { Highlight } from '../../../lib/networking/fragments/highlightFragment'
|
||||
import { Label } from '../../../lib/networking/fragments/labelFragment'
|
||||
import {
|
||||
LibraryItem,
|
||||
LibraryItemNode,
|
||||
} from '../../../lib/networking/queries/useGetLibraryItemsQuery'
|
||||
import { LibraryItemNode } from '../../../lib/networking/queries/useGetLibraryItemsQuery'
|
||||
import { UserBasicData } from '../../../lib/networking/queries/useGetViewerQuery'
|
||||
import { Dropdown, DropdownOption } from '../../elements/DropdownElements'
|
||||
import { LabelChip } from '../../elements/LabelChip'
|
||||
|
||||
Reference in New Issue
Block a user