diff --git a/petstore/petstoreapp/soulmachines-react-app/src/components/ContentCardSwitch.js b/petstore/petstoreapp/soulmachines-react-app/src/components/ContentCardSwitch.js index 15655e27..d4a4f0a6 100644 --- a/petstore/petstoreapp/soulmachines-react-app/src/components/ContentCardSwitch.js +++ b/petstore/petstoreapp/soulmachines-react-app/src/components/ContentCardSwitch.js @@ -6,6 +6,7 @@ import Markdown from './ContentCards/Markdown'; import Link from './ContentCards/Link'; import Image from './ContentCards/Image'; import Video from './ContentCards/Video'; +import ButtonWithImage from './ContentCards/ButtonWithImage'; import { setActiveCards, animateCamera } from '../store/sm/index'; import ImageCarousel from './ContentCards/ImageCarousel'; @@ -47,6 +48,10 @@ function ContentCardSwitch({ element: Video, removeOnClick: false, }, + buttonWithImage: { + element: ButtonWithImage, + removeOnClick: false, + }, }; if ('type' in card === false) { diff --git a/petstore/petstoreapp/soulmachines-react-app/src/components/ContentCards/ButtonWithImage.js b/petstore/petstoreapp/soulmachines-react-app/src/components/ContentCards/ButtonWithImage.js new file mode 100644 index 00000000..accaa28e --- /dev/null +++ b/petstore/petstoreapp/soulmachines-react-app/src/components/ContentCards/ButtonWithImage.js @@ -0,0 +1,60 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import styled from 'styled-components'; + +function ButtonWithImage({ data, className }) { + const { + title, imageUrl, description, imageAltText, buttonText, + } = data; + return ( +
{description}
+