diff --git a/react-frontend/src/shared-components/create-recognition-button/CreateRecognitionButton.js b/react-frontend/src/shared-components/create-recognition-button/CreateRecognitionButton.js new file mode 100644 index 000000000..96f0e1684 --- /dev/null +++ b/react-frontend/src/shared-components/create-recognition-button/CreateRecognitionButton.js @@ -0,0 +1,56 @@ +import React from "react"; +import styled from "styled-components"; +import PropTypes from "prop-types"; + +import PlusSign from "shared-components/plus-sign/PlusSign"; //todo depend upon peerly logo + +const ButtonComponent = styled.div` + background: transparent url(${(props) => props.imageUrl}) 90% 60% no-repeat + padding-box; + opacity: 1; + box-shadow: 0px 3px 6px #0000004e; + width: 45px; + height: 45px; + background-color: var(--rust); + border: none; + border-radius: 50%; + margin-top: 7.5px; + margin-left: 7.5px; +`; + +const PlusSignWrapper = styled.div` + position: absolute; + margin-left: 10px; + margin-top: 8px; + font-size: 23px; + color: var(--white); +`; + +const RoundCircle = styled.div` + position: absolute; + background: var(--white) 0% 0% no-repeat padding-box; + box-shadow: 0px 3px 6px #0000004e; + opacity: 1; + border-radius: 50%; + width: 60px; + height: 60px; +`; + +const CreateRecognitionButton = ({ onClick, imageUrl }) => { + return ( + + + + + + + + ); +}; + +CreateRecognitionButton.propTypes = { + onClick: PropTypes.func.isRequired, + imageUrl: PropTypes.string.isRequired, +}; + +export default React.memo(CreateRecognitionButton); diff --git a/react-frontend/src/shared-components/create-recognition-button/CreateRecognitionButton.test.js b/react-frontend/src/shared-components/create-recognition-button/CreateRecognitionButton.test.js new file mode 100644 index 000000000..0a1b33205 --- /dev/null +++ b/react-frontend/src/shared-components/create-recognition-button/CreateRecognitionButton.test.js @@ -0,0 +1,18 @@ +import React from "react"; +import { render } from "@testing-library/react"; + +import CreateRecognitionButton from "shared-components/create-recognition-button/CreateRecognitionButton"; + +describe("Image component test", () => { + const onClick = () => { + onClick; + }; + + test("renders + sign for the component", () => { + const { getByText } = render( + + ); + const testImage = getByText("+"); + expect(testImage).toBeInTheDocument(); + }); +}); diff --git a/react-frontend/src/shared-components/create-recognition-left-panel/CreateRecognitionLeftPanel.js b/react-frontend/src/shared-components/create-recognition-left-panel/CreateRecognitionLeftPanel.js new file mode 100644 index 000000000..de8a48cb1 --- /dev/null +++ b/react-frontend/src/shared-components/create-recognition-left-panel/CreateRecognitionLeftPanel.js @@ -0,0 +1,69 @@ +import React from "react"; +import styled from "styled-components"; +import PropTypes from "prop-types"; + +import { Card } from "core-components/card/card"; +import Img from "shared-components/user-image-name/UserImageName"; +import { Row } from "core-components/grid/GridComponent"; +import CreateRecognitionButton from "shared-components/create-reccognition-button/CreateRecognitionButton"; + +const ButtonComponentWrapper = styled.div` + position: absolute; + margin-top: 200px; + margin-left: -35px; +`; + +const CreateRecognitionLeftPanel = ({ + hi5ImageForButton, + emaployeeImage, + employeeName, + hi5CollectedImage, + hi5Collected, +}) => { + const onClick = () => { + //todo + }; + return ( + + + + + + + + + + + + + + ); +}; + +CreateRecognitionLeftPanel.propTypes = { + hi5ImageForButton: PropTypes.string.isRequired, + emaployeeImage: PropTypes.string.isRequired, + employeeName: PropTypes.string.isRequired, + hi5CollectedImage: PropTypes.string.isRequired, + hi5Collected: PropTypes.string.isRequired, +}; + +export default CreateRecognitionLeftPanel;