Skip to content

Commit

Permalink
refactor: use Button from theme
Browse files Browse the repository at this point in the history
  • Loading branch information
roadlittledawn committed Jun 21, 2021
1 parent a956633 commit bb88a9e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/components/ImageSlider/ImageSlider.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React, { useState } from 'react';
import { css } from '@emotion/react';
import { Icon } from '@newrelic/gatsby-theme-newrelic';
import { Button, Icon } from '@newrelic/gatsby-theme-newrelic';

const ImageSlider = ({ images, height }) => {
const [selectedImageIndex, setSelectedImageIndex] = useState(0);
Expand Down Expand Up @@ -29,8 +29,9 @@ const ImageSlider = ({ images, height }) => {
>
{images.length > 1 && (
<>
<button
<Button
onClick={handleClickPrev}
variant={Button.VARIANT.PLAIN}
css={css`
position: absolute;
top: 38%;
Expand All @@ -42,9 +43,10 @@ const ImageSlider = ({ images, height }) => {
`}
>
<Icon name="chevron-left" size="4rem" />
</button>
<button
</Button>
<Button
onClick={handleClickNext}
variant={Button.VARIANT.PLAIN}
css={css`
position: absolute;
top: 38%;
Expand All @@ -56,7 +58,7 @@ const ImageSlider = ({ images, height }) => {
`}
>
<Icon name="chevron-right" size="4rem" />
</button>
</Button>
</>
)}
<a
Expand Down

0 comments on commit bb88a9e

Please sign in to comment.