diff --git a/src/components/card/Card.tsx b/src/components/card/Card.tsx index 0d38846..aa835cb 100644 --- a/src/components/card/Card.tsx +++ b/src/components/card/Card.tsx @@ -47,6 +47,9 @@ const Card = ({ cacheImages, cachePath, handleFavorite, + notVisibleByDefault, + noInfoPanel, + noModalButton, ...rest }: any) => { const history = useHistory(); @@ -190,18 +193,16 @@ const Card = ({ return ( <> - { - if (e.key === ' ' || e.key === 'Enter') { - handleClick(); - } - }} - style={rest.style} - > + - + { + if (e.key === ' ' || e.key === 'Enter') { + handleClick(); + } + }} + > {rest.coverArt.match('placeholder') ? ( { if (cacheImages) { cacheImage( @@ -285,7 +286,7 @@ const Card = ({ /> )} - {!rest.isModal && ( + {!rest.isModal && !noModalButton && ( - - - - - - {rest.title} - - - - - - {subUrl ? ( + {!noInfoPanel && ( + + - - + - {rest.subtitle} - + {rest.title} + - ) : ( - - {rest.subtitle !== 'undefined' ? rest.subtitle : } - - )} - - + + + {subUrl ? ( + + + + {rest.subtitle} + + + + ) : ( + + {rest.subtitle !== 'undefined' ? rest.subtitle : } + + )} + + + )} ); diff --git a/src/components/card/styled.tsx b/src/components/card/styled.tsx index 2e9b729..01912a8 100644 --- a/src/components/card/styled.tsx +++ b/src/components/card/styled.tsx @@ -59,10 +59,6 @@ export const CardPanel = styled(Panel)` filter: ${(props) => props.theme.other.card.hover.filter}; transition: ${(props) => props.theme.other.card.hover.transition}; } - - &:focus-visible { - outline: 2px ${(props) => props.theme.colors.primary} solid; - } `; export const InfoPanel = styled(Panel)` @@ -82,6 +78,11 @@ export const ImgPanel = styled(Panel)` border-left: ${(props) => props.theme.other.card.image.borderLeft} !important; border-radius: ${(props) => props.theme.other.card.image.borderRadius} !important; + &:focus-visible { + border-color: ${(props) => props.theme.colors.primary} !important; + outline: none !important; + } + &:hover { border-color: ${(props) => props.theme.colors.primary} !important; @@ -109,6 +110,7 @@ export const CardButton = styled(Button)` white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + transition: 0s; `; export const CardTitleWrapper = styled.span` @@ -156,7 +158,6 @@ export const CardSubtitle = styled.div` export const CardImg = styled.img` height: ${(props) => `${props.cardsize}px`}; - width: ${(props) => `${props.cardsize}px`}; `; export const LazyCardImg = styled(LazyLoadImage)`