From 48ba99176f0da30211fd1aa4762f39207fc30871 Mon Sep 17 00:00:00 2001 From: Avinash Mane Date: Tue, 2 Jun 2020 18:17:25 +0530 Subject: [PATCH] resolve comments and added icons core component --- .../src/core-components/icon/icons.js | 1 + .../RecognitionCardComponent.js | 4 +- .../RecognitionCardHeaderComponent.js | 70 ++++++++++--------- .../RecognitionTextComponent.js | 4 +- .../CoreValueIconComponent.js | 15 ---- .../CoreValueIconComponent.test.js | 11 --- 6 files changed, 41 insertions(+), 64 deletions(-) create mode 100644 react-frontend/src/core-components/icon/icons.js delete mode 100644 react-frontend/src/shared-components/core-value-icon-components/CoreValueIconComponent.js delete mode 100644 react-frontend/src/shared-components/core-value-icon-components/CoreValueIconComponent.test.js diff --git a/react-frontend/src/core-components/icon/icons.js b/react-frontend/src/core-components/icon/icons.js new file mode 100644 index 000000000..4083f06e0 --- /dev/null +++ b/react-frontend/src/core-components/icon/icons.js @@ -0,0 +1 @@ +export { BsCircle } from "react-icons/bs"; diff --git a/react-frontend/src/recognition-list-components/RecognitionCardComponent.js b/react-frontend/src/recognition-list-components/RecognitionCardComponent.js index 434453ca9..cd8ebcd06 100644 --- a/react-frontend/src/recognition-list-components/RecognitionCardComponent.js +++ b/react-frontend/src/recognition-list-components/RecognitionCardComponent.js @@ -4,10 +4,10 @@ import styled from "styled-components"; import { Row, Col } from "core-components/grid/GridComponent"; import { Card } from "core-components/card/CardComponent"; +import { BsCircle } from "core-components/icon/icons"; import ImageComponent from "core-components/image/ImageComponent"; import RecognitionCardHeaderComponent from "recognition-list-components/RecognitionCardHeaderComponent"; import RecognitionTextComponent from "recognition-list-components/RecognitionTextComponent"; -import CoreValueIconComponent from "shared-components/core-value-icon-components/CoreValueIconComponent"; import HighFiveComponent from "shared-components/high-five-components/HighFiveComponent"; const giveHighFive = () => { @@ -71,7 +71,7 @@ const RecognitionCardComponent = ({ /> - + diff --git a/react-frontend/src/recognition-list-components/RecognitionCardHeaderComponent.js b/react-frontend/src/recognition-list-components/RecognitionCardHeaderComponent.js index 81afca8ce..0ca7a7505 100644 --- a/react-frontend/src/recognition-list-components/RecognitionCardHeaderComponent.js +++ b/react-frontend/src/recognition-list-components/RecognitionCardHeaderComponent.js @@ -2,7 +2,7 @@ import React from "react"; import PropTypes from "prop-types"; import styled from "styled-components"; -import { Row } from "core-components/grid/GridComponent"; +import { Row, Col } from "core-components/grid/GridComponent"; import { Form } from "core-components/form/FormComponent"; import { Button } from "core-components/button/ButtonComponent"; import ImageComponent from "core-components/image/ImageComponent"; @@ -22,43 +22,45 @@ const RecognitionCardHeaderComponent = ({ }) => { return ( - - - - - - - - - {given_for} - - - got a high five for - - {core_value} - + + + + + + + + + + {given_for} + + + got a high five for + + {core_value} + + - - - - got a high five for - - {core_value} - + + + got a high five for + + {core_value} + + + {given_at} - {given_at} - + ); }; diff --git a/react-frontend/src/recognition-list-components/RecognitionTextComponent.js b/react-frontend/src/recognition-list-components/RecognitionTextComponent.js index 436e1c234..902e80c24 100644 --- a/react-frontend/src/recognition-list-components/RecognitionTextComponent.js +++ b/react-frontend/src/recognition-list-components/RecognitionTextComponent.js @@ -25,12 +25,12 @@ const Img = styled.div` `; const RecognitionTextComponent = ({ text, given_by }) => ( - + {text} - + {given_by} { - const { size, color } = props; - return ; -}; - -CoreValueIconComponent.propTypes = { - size: PropTypes.string.isRequired, - color: PropTypes.string.isRequired, -}; - -export default CoreValueIconComponent; diff --git a/react-frontend/src/shared-components/core-value-icon-components/CoreValueIconComponent.test.js b/react-frontend/src/shared-components/core-value-icon-components/CoreValueIconComponent.test.js deleted file mode 100644 index edc70c163..000000000 --- a/react-frontend/src/shared-components/core-value-icon-components/CoreValueIconComponent.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import React from "react"; -import { render } from "@testing-library/react"; -import CoreValueIconComponent from "./CoreValueIconComponent"; - -it("renders image component with image", () => { - const { getByTestId } = render( - - ); - const testIcon = getByTestId("CoreValueIcon"); - expect(testIcon).toBeInTheDocument(); -});