diff --git a/images/icons/v2/arrow-left-32.svg b/images/icons/v2/arrow-left-32.svg new file mode 100644 index 000000000..d681d81d3 --- /dev/null +++ b/images/icons/v2/arrow-left-32.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/icons/v2/arrow-right-32.svg b/images/icons/v2/arrow-right-32.svg new file mode 100644 index 000000000..ab61e0baa --- /dev/null +++ b/images/icons/v2/arrow-right-32.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/stylesheets/components/StoryViewer.scss b/stylesheets/components/StoryViewer.scss index 14249034e..ab391b88f 100644 --- a/stylesheets/components/StoryViewer.scss +++ b/stylesheets/components/StoryViewer.scss @@ -56,8 +56,6 @@ &__container { flex-grow: 1; overflow: hidden; - position: relative; - z-index: $z-index-base; } &__story { @@ -74,7 +72,7 @@ transform: translateX(-50%); min-width: 284px; width: 56.25vh; - z-index: $z-index-above-base; + z-index: $z-index-above-above-base; &--group-avatar { margin-left: -8px; @@ -156,14 +154,16 @@ } &__arrow { + @include button-reset; align-items: center; display: flex; height: 100vh; position: absolute; width: 25%; + z-index: $z-index-above-above-base; - button { - @include button-reset; + &::before { + content: ''; height: 24px; opacity: 0; width: 24px; @@ -174,10 +174,10 @@ justify-content: flex-start; left: 0; - button { + &::before { margin-left: 24px; @include color-svg( - '../images/icons/v2/chevron-left-24.svg', + '../images/icons/v2/arrow-left-32.svg', $color-white ); } @@ -187,25 +187,24 @@ justify-content: flex-end; right: 0; - button { + &::before { margin-right: 24px; @include color-svg( - '../images/icons/v2/chevron-right-24.svg', + '../images/icons/v2/arrow-right-32.svg', $color-white ); } } - &--visible button { + &--visible::before { opacity: 1; - visibility: visible; } } &__protection { position: absolute; width: 100%; - z-index: $z-index-above-base; + z-index: $z-index-base; &--top { background: linear-gradient($color-black-alpha-16, $color-transparent); diff --git a/ts/components/StoryViewer.stories.tsx b/ts/components/StoryViewer.stories.tsx index f3b9ec515..b69cb33ed 100644 --- a/ts/components/StoryViewer.stories.tsx +++ b/ts/components/StoryViewer.stories.tsx @@ -45,6 +45,7 @@ function getDefaultProps(): PropsType { path: 'snow.jpg', url: '/fixtures/snow.jpg', }), + canReply: true, messageId: '123', sender, timestamp: Date.now(), @@ -64,6 +65,7 @@ story.add('Wide story', () => ( path: 'file.jpg', url: '/fixtures/nathan-anderson-316188-unsplash.jpg', }), + canReply: true, messageId: '123', sender: getDefaultConversation(), timestamp: Date.now(), @@ -103,6 +105,7 @@ story.add('Multi story', () => { path: 'file.jpg', url: '/fixtures/nathan-anderson-316188-unsplash.jpg', }), + canReply: true, messageId: '456', sender, timestamp: Date.now() - 3600, @@ -122,6 +125,7 @@ story.add('Caption', () => ( path: 'file.jpg', url: '/fixtures/nathan-anderson-316188-unsplash.jpg', }), + canReply: true, messageId: '123', sender: getDefaultConversation(), timestamp: Date.now(), @@ -141,6 +145,7 @@ story.add('Long Caption', () => ( path: 'file.jpg', url: '/fixtures/snow.jpg', }), + canReply: true, messageId: '123', sender: getDefaultConversation(), timestamp: Date.now(), diff --git a/ts/components/StoryViewer.tsx b/ts/components/StoryViewer.tsx index 72027223d..968eca1ee 100644 --- a/ts/components/StoryViewer.tsx +++ b/ts/components/StoryViewer.tsx @@ -370,21 +370,18 @@ export const StoryViewer = ({ style={{ background: getStoryBackground(attachment) }} />
-
setArrowToShow(Arrow.Left)} - > -
+ type="button" + />
)} -
- {caption && ( -
- {caption.text} - {caption.hasReadMore && !hasExpandedCaption && ( - - )} -
- )} - - {group && ( - - )} -
- {group - ? i18n('Stories__from-to-group', { - name: title, - group: group.title, - }) - : title} -
- -
- {stories.map((story, index) => ( -
- {currentStoryIndex === index ? ( - `${width}%`), - }} - /> - ) : ( -
- )} -
- ))} -
-
- {canReply && ( +
+
+ {caption && ( +
+ {caption.text} + {caption.hasReadMore && !hasExpandedCaption && ( )}
+ )} + + {group && ( + + )} +
+ {group + ? i18n('Stories__from-to-group', { + name: title, + group: group.title, + }) + : title} +
+ +
+ {stories.map((story, index) => ( +
+ {currentStoryIndex === index ? ( + `${width}%`), + }} + /> + ) : ( +
+ )} +
+ ))} +
+
+ {canReply && ( + + )}
-
setArrowToShow(Arrow.Right)} - > -
+ type="button" + />