From 253a2ac186d2d0befd869da5d7a0800cf8acc5d9 Mon Sep 17 00:00:00 2001 From: mahdi Date: Wed, 22 Dec 2021 11:11:48 +0330 Subject: [PATCH] update --- src/App.js | 2 +- src/components/buttonDesign/ButtonDesign.js | 40 ++-- src/components/productTags/ProductTags.js | 198 ++++++-------------- src/components/productTags/ProductTags.scss | 3 + tailwind.config.js | 31 ++- 5 files changed, 98 insertions(+), 176 deletions(-) diff --git a/src/App.js b/src/App.js index b30fabe..5e53204 100644 --- a/src/App.js +++ b/src/App.js @@ -7,7 +7,7 @@ function App() { return (
{/* */} - {/* */} +
); diff --git a/src/components/buttonDesign/ButtonDesign.js b/src/components/buttonDesign/ButtonDesign.js index 1e832ce..48a9cd8 100644 --- a/src/components/buttonDesign/ButtonDesign.js +++ b/src/components/buttonDesign/ButtonDesign.js @@ -32,81 +32,81 @@ const ButtonDesign = () => { {/* Button UI Design */}
-
-
-
-
-
-
-
- - -
-
- -
- -
- -
- -
diff --git a/src/components/productTags/ProductTags.js b/src/components/productTags/ProductTags.js index e96e5db..c9c05be 100644 --- a/src/components/productTags/ProductTags.js +++ b/src/components/productTags/ProductTags.js @@ -1,10 +1,18 @@ import React from "react"; +import "./ProductTags.scss"; import blackCancleIcon from "../../assets/icons/black-cancle-icon.svg"; import blackDeliveryIcon from "../../assets/icons/black-delivery-icon.svg"; import blackRightIcon from "../../assets/icons/black-right-icon.svg"; -const ProductTags = ({ tagtitlecolor }) => { +const ProductTags = ({ + tagtitlecolor, + tagBgColor, + tagBorderColor, + deliveryIcon, + rightIcon, + cancleIcon, +}) => { return (
@@ -15,152 +23,20 @@ const ProductTags = ({ tagtitlecolor }) => { {/* product UI Design */}
{/* 1 */} -
+
- - - - - - -
- {/* 2 */} -
- - - - - - - -
- {/* 3 */} -
- - - - - - - -
- {/* 4 */} -
- - - - - - - -
- {/* 5 */} -
- - - - - - - -
@@ -170,6 +46,38 @@ const ProductTags = ({ tagtitlecolor }) => { export default ProductTags; +// color classes that i defined in tailwind.config.js and we can use for text color: +// 1 ----> text-lightBlueTextColor +// 2 ----> text-grayTextColor +// 3 ----> text-lightOrangeTextColor +// 4 ----> text-lightYellowTextColor +// 4 ----> text-lightGreenTextColor +// 4 ----> text-lightPurpleTextColor +// 5 ----> text-darkBlueTextColor + +// color classes that i defined in tailwind.config.js and we can use for background color: +// 1 ----> bg-productTagBg +// 2 ----> bg-lightOrangeBgColor +// 3 ----> bg-lightYellowBgColor +// 4 ----> bg-lightBlueBgColor +// 4 ----> bg-lightGreenBgColor +// 4 ----> bg-lightPurpleBgColor + +// color classes that i defined in tailwind.config.js and we can use for border color: +// 1 ----> border-lightBlueBorderColor +// 2 ----> border-grayBorderColor +// 3 ----> border-lightOrangeBorderColor +// 4 ----> border-lightYellowBorderColor +// 5 ----> border-lightGreenBorderColor +// 5 ----> border-lightPurpleBorderColor +// 6 ----> border-darkBlueBorderColor + ProductTags.defaultProps = { - tagtitlecolor: "text-red-400", + tagtitlecolor: "text-lightPurpleTextColor", + tagBgColor: "bg-lightPurpleBgColor", + tagBorderColor: "border-lightPurpleBorderColor", + // for icons + deliveryIcon: true, + rightIcon: false, + cancleIcon: true, }; diff --git a/src/components/productTags/ProductTags.scss b/src/components/productTags/ProductTags.scss index e69de29..391939f 100644 --- a/src/components/productTags/ProductTags.scss +++ b/src/components/productTags/ProductTags.scss @@ -0,0 +1,3 @@ +.product-tag-button { + @apply flex items-center rounded border-2 m-1 px-4 py-1 text-xs; +} diff --git a/tailwind.config.js b/tailwind.config.js index a0fffb2..2a75263 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -17,9 +17,13 @@ module.exports = { selectColor2: "#89ECFF", selectColor3: "#FC5353", selectColor4: "#FCF653", - // used in ButtonDesign Component - moreInfoButtonTextColor: "#06BACE", - cancleButtonTextColor: "#646464", + lightBlueTextColor: "#06BACE", + grayTextColor: "#646464", + lightOrangeTextColor: "#F7B605", + lightYellowTextColor: "#C8EE49", + lightGreenTextColor: "#5DCE06", + lightPurpleTextColor: "#A680FF", + darkBlueTextColor: "#0615CE", }), backgroundColor: (theme) => ({ ...theme("colors"), @@ -29,18 +33,25 @@ module.exports = { discountPriceBg: "#F0FFF1", counterBg: "#66B1EB", incrementDecrementBg: "#2E7AB5", - // used in ButtonDesign Component - moreInfoButtonBg: "#038A99", - cancleButtonBg: "#DBDBDB", + darkGreenBg: "#038A99", + midGrayBgColor: "#DBDBDB", + lightOrangeBgColor: "#F7B605", + lightYellowBgColor: "#CEFE2D", //opacity should be 10 % instead of 100% + lightBlueBgColor: "#8891FC", //opacity should be 10 % instead of 100% + lightGreenBgColor: "#5DCE06", //opacity should be 3 % instead of 100% + lightPurpleBgColor: "#A680FF", //opacity should be 8 % instead of 100% }), borderColor: (theme) => ({ ...theme("colors"), // used in ProductDesign Component productDesignBorderColor: "#F3F3F3", - // used in ButtonDesign Component - moreInfoButtonBorderColor: "#06BACE", - // used in ProductTags Component - productTagBorderColor1: "#C3C3C3", + lightBlueBorderColor: "#06BACE", + grayBorderColor: "#C3C3C3", + lightOrangeBorderColor: "#F7B605", + lightYellowBorderColor: "#CFFF2D", + lightGreenBorderColor: "#5DCE06", + lightPurpleBorderColor: "#A680FF", + darkBlueBorderColor: "#0615CE", }), }, plugins: [],