From 14917daacefcf757df2a41a8e9bc00f736f01cc3 Mon Sep 17 00:00:00 2001 From: Roy Schut Date: Fri, 28 May 2021 12:13:17 +0200 Subject: [PATCH] feat(videodetail): add button icons --- src/components/Shelf/Shelf.module.scss | 6 +++--- src/components/Shelf/Shelf.tsx | 13 ++++++------- src/icons/ArrowLeft.tsx | 2 +- src/icons/ChevronLeft.tsx | 10 ++++++++++ src/icons/{ArrowRight.tsx => ChevronRight.tsx} | 0 src/icons/Favorite.tsx | 13 +++++++++++++ src/icons/PlayTrailer.tsx | 13 +++++++++++++ src/icons/Share.tsx | 13 +++++++++++++ 8 files changed, 59 insertions(+), 11 deletions(-) create mode 100644 src/icons/ChevronLeft.tsx rename src/icons/{ArrowRight.tsx => ChevronRight.tsx} (100%) create mode 100644 src/icons/Favorite.tsx create mode 100644 src/icons/PlayTrailer.tsx create mode 100644 src/icons/Share.tsx diff --git a/src/components/Shelf/Shelf.module.scss b/src/components/Shelf/Shelf.module.scss index 2d683e730..339c48811 100644 --- a/src/components/Shelf/Shelf.module.scss +++ b/src/components/Shelf/Shelf.module.scss @@ -18,7 +18,7 @@ font-family: var(--body-alt-font-family); &:hover { - .arrow { + .chevron { opacity: 1; &.disabled { opacity: 0.3; @@ -39,14 +39,14 @@ text-overflow: ellipsis; } -.arrow { +.chevron { cursor: pointer; outline-color: var(--highlight-color, white); padding: 12px 0px; transition: transform 0.2s ease-out, opacity 0.2s ease-out; -webkit-transition: transform 0.3s ease-out, opacity 0.3s ease-out; opacity: 0; - + > svg { width: 30px; height: 30px; diff --git a/src/components/Shelf/Shelf.tsx b/src/components/Shelf/Shelf.tsx index 070506911..084393e84 100644 --- a/src/components/Shelf/Shelf.tsx +++ b/src/components/Shelf/Shelf.tsx @@ -5,8 +5,8 @@ import classNames from 'classnames'; import Card from '../Card/Card'; import TileDock from '../TileDock/TileDock'; import useBreakpoint, { Breakpoint, Breakpoints } from '../../hooks/useBreakpoint'; -import ArrowLeft from '../../icons/ArrowLeft'; -import ArrowRight from '../../icons/ArrowRight'; +import ChevronLeft from '../../icons/ChevronLeft'; +import ChevronRight from '../../icons/ChevronRight'; import { findPlaylistImageForWidth } from '../../utils/collection'; import styles from './Shelf.module.scss'; @@ -68,9 +68,8 @@ const Shelf: React.FC = ({ transitionTime={loading ? '0s' : '0.3s'} spacing={8} renderLeftControl={(doSlide) => ( - renderLeftControl={(handleClick) => (
= ({ } onClick={() => handleSlide(doSlide)} > - +
)} renderRightControl={(doSlide) => (
= ({ } onClick={() => handleSlide(doSlide)} > - +
)} renderTile={(item, isInView) => { diff --git a/src/icons/ArrowLeft.tsx b/src/icons/ArrowLeft.tsx index 35bcc0d33..994530793 100644 --- a/src/icons/ArrowLeft.tsx +++ b/src/icons/ArrowLeft.tsx @@ -5,6 +5,6 @@ import createIcon from './Icon'; export default createIcon( '0 0 24 24', - + , ); diff --git a/src/icons/ChevronLeft.tsx b/src/icons/ChevronLeft.tsx new file mode 100644 index 000000000..35bcc0d33 --- /dev/null +++ b/src/icons/ChevronLeft.tsx @@ -0,0 +1,10 @@ +import React from 'react'; + +import createIcon from './Icon'; + +export default createIcon( + '0 0 24 24', + + + , +); diff --git a/src/icons/ArrowRight.tsx b/src/icons/ChevronRight.tsx similarity index 100% rename from src/icons/ArrowRight.tsx rename to src/icons/ChevronRight.tsx diff --git a/src/icons/Favorite.tsx b/src/icons/Favorite.tsx new file mode 100644 index 000000000..a368520a9 --- /dev/null +++ b/src/icons/Favorite.tsx @@ -0,0 +1,13 @@ +import React from 'react'; + +import createIcon from './Icon'; + +export default createIcon( + '0 0 24 24', + + + , +); diff --git a/src/icons/PlayTrailer.tsx b/src/icons/PlayTrailer.tsx new file mode 100644 index 000000000..b210338e5 --- /dev/null +++ b/src/icons/PlayTrailer.tsx @@ -0,0 +1,13 @@ +import React from 'react'; + +import createIcon from './Icon'; + +export default createIcon( + '0 0 24 24', + + + , +); diff --git a/src/icons/Share.tsx b/src/icons/Share.tsx new file mode 100644 index 000000000..c6070ebdd --- /dev/null +++ b/src/icons/Share.tsx @@ -0,0 +1,13 @@ +import React from 'react'; + +import createIcon from './Icon'; + +export default createIcon( + '0 0 24 24', + + + , +);