import { animated } from 'react-spring'; import styled from 'styled-components'; import { ItemCardProps } from './interfaces'; export const StyledCard = styled.a` border: 1px solid #e2e2e5; width: 100%; position: relative; background: ${({ theme }) => theme.colors.neutral[0]}; display: flex; flex-direction: column; justify-content: start; border-radius: 4px; overflow: hidden; cursor: ${({ cursor }) => cursor || 'default'}; ${({ theme, disableHoverState }) => !disableHoverState && `&:hover { border-color: ${theme.colors.neutral[900]}; }`} ${({ theme, forceActiveState }) => forceActiveState && ` border-color: ${theme.colors.neutral[900]}; box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.16); `} `; export const CardHeader = styled.div` display: flex; flex-direction: row; justify-content: space-between; align-items: center; padding: 16px; @media (max-width: ${({ theme }) => theme.screens.mobile}) { padding: 12px; } `; type ThumbnailWrapperProps = { withPadding: boolean; minHeight?: number; maxHeight?: number; }; export const ThumbnailWrapper = styled.div` overflow: hidden; width: 100%; position: relative; background: ${({ theme }) => theme.colors.neutral[25]}; display: flex; align-items: center; justify-content: center; padding: ${({ withPadding }) => (withPadding ? '16px 0' : '0')}; ${({ minHeight }) => minHeight && `min-height: ${minHeight}px`}; img { max-height: ${({ maxHeight, withPadding }) => maxHeight ? `${maxHeight - (withPadding ? 32 : 0)}px` : `calc(100% - ${withPadding ? 32 : 0}px)`}; max-width: ${({ withPadding }) => withPadding ? 'calc(100% - 32px)' : '100%'}; } `; export const CardFooter = styled.div` display: flex; flex-direction: row; align-items: center; min-height: 52px; padding: 0 16px; @media (max-width: ${({ theme }) => theme.screens.mobile}) { padding: 0 12px; } `; export const FavoriteButton = styled.button` background: transparent; border-radius: 50%; border: none; padding: 0; display: flex; align-items: center; gap: 4px; `; export const HoverDrawer = styled(animated.div)` position: absolute; bottom: 1px; left: 0; right: 0; display: flex; flex-direction: column; justify-content: center; background: ${({ theme }) => theme.colors.neutral[0]}; box-shadow: 0px -2px 4px rgba(0, 0, 0, 0.04); padding: 16px; @media (max-width: ${({ theme }) => theme.screens.mobile}) { display: none; } `; export const Divider = styled.div` width: 100%; border-bottom: 1px solid ${({ theme }) => theme.colors.neutral[50]}; margin: 12px 0; `; export const Row = styled.div` display: flex; align-items: center; `; export const PendingTag = styled.div` padding: 4px 8px; align-items: center; display: flex; background: #0a0a0b; border: 1px solid ${({ theme }) => theme.colors.neutral[900]}; border-radius: 4px; width: min-content; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; position: absolute; top: 8px; right: 8px; `;