From 2cb0b0aeb1dbbc45cdf819370b2d5527fe83a920 Mon Sep 17 00:00:00 2001 From: Daniel Gasienica Date: Sun, 15 Apr 2018 01:19:46 -0400 Subject: [PATCH] Add arrow controls --- stylesheets/_lightbox.scss | 12 ++++++++++++ ts/components/Lightbox.tsx | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/stylesheets/_lightbox.scss b/stylesheets/_lightbox.scss index ea8dc95bd..88ce10d66 100644 --- a/stylesheets/_lightbox.scss +++ b/stylesheets/_lightbox.scss @@ -42,4 +42,16 @@ @include color-svg('../images/x.svg', white); } } + + &.previous { + &:before { + @include color-svg('../images/back.svg', white); + } + } + + &.next { + &:before { + @include color-svg('../images/forward.svg', white); + } + } } diff --git a/ts/components/Lightbox.tsx b/ts/components/Lightbox.tsx index ad8c8f0cf..066c77169 100644 --- a/ts/components/Lightbox.tsx +++ b/ts/components/Lightbox.tsx @@ -43,7 +43,7 @@ const styles = { }; interface IconButtonProps { - type: 'save' | 'close'; + type: 'save' | 'close' | 'previous' | 'next'; onClick?: () => void; } const IconButton = ({ onClick, type }: IconButtonProps) => ( @@ -71,6 +71,8 @@ export class Lightbox extends React.Component {
+ +
);