Skip to content

Commit 10fc8dd

Browse files
Merge pull request #332 from topcoder-platform/issue-331
Info icons next to visual styles are missing #331
2 parents 8c7e9d3 + 5bc7240 commit 10fc8dd

File tree

5 files changed

+37
-13
lines changed

5 files changed

+37
-13
lines changed
+16-8
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,42 @@
11
[
22
{
33
"name": "Dark / Saturated",
4-
"className": "dark-saturated"
4+
"className": "dark-saturated",
5+
"description": "Dark and saturated backgroud colors give a dramatic feel. Used often in entertainment and luxury brand websites."
56
},
67
{
78
"name": "Light / Airy",
8-
"className": "light-airy"
9+
"className": "light-airy",
10+
"description": "Light and airy themes provide a clean and fresh feel. Used often in wellness and e-commerce sites for a calm and sophisticated style."
911
},
1012
{
1113
"name": "Fun / Playful",
12-
"className": "fun-playful"
14+
"className": "fun-playful",
15+
"description": "A fun and playful feel is suggested with bright colors and whimsical elements. Many sites geared at consumers for entertainment and children’s products follow this style."
1316
},
1417
{
1518
"name": "Mature / Serious",
16-
"className": "mature-serious"
19+
"className": "mature-serious",
20+
"description": "Mature and serious subject matter is often represented with straightforward font styling and photographs. Muted colors and clear typography help keep the focus on content being presented."
1721
},
1822
{
1923
"name": "Simple / Minimalist",
20-
"className": "simple-minimalist"
24+
"className": "simple-minimalist",
25+
"description": "Many modern brands use a very simple and minimalist approach to website style. White space is plentiful and the display is kept to few key elements without added decoration."
2126
},
2227
{
2328
"name": "Vibrant / Colorful",
24-
"className": "vibrant-colorful"
29+
"className": "vibrant-colorful",
30+
"description": "Bold color combinations and engaging visual shapes or images provide a feel of high energy. This style is often used to match a youthful brand or engaging subject matter."
2531
},
2632
{
2733
"name": "Soft / Organic",
28-
"className": "soft-organic"
34+
"className": "soft-organic",
35+
"description": "Earthy or pale colors and organic shapes are often used in sites wishing to convey a sense of nature and softness."
2936
},
3037
{
3138
"name": "Bold / Rugged",
32-
"className": "bold-rugged"
39+
"className": "bold-rugged",
40+
"description": "Bold colors, larger heavy fonts, rough shapes, and outdoor settings are used in sites wanting to convey a solid and masculine feel."
3341
}
3442
]

src/components/HelpIcon/index.jsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@ import { v4 as uuidv4 } from "uuid";
55

66
import "./styles.module.scss";
77

8-
const HelpIcon = ({ children }) => {
8+
const HelpIcon = ({ children, inverted, arrowColor = "#f4f4f4", backgroundColor = "#f4f4f4", textColor = "#00000" }) => {
99
const tooltipId = useRef(uuidv4());
1010

1111
return (
1212
<div styleName="help-icon">
1313
<HintIcon data-tip data-for={tooltipId.current} />
1414
<ReactTooltip
15-
arrowColor="#f4f4f4"
16-
backgroundColor="#f4f4f4"
17-
styleName="tooltip"
15+
arrowColor={arrowColor}
16+
backgroundColor={backgroundColor}
17+
textColor={textColor}
18+
styleName={["tooltip", inverted ? "inverted" : ""].join(" ")}
1819
id={tooltipId.current}
1920
aria-haspopup="true"
2021
place="bottom"

src/components/HelpIcon/styles.module.scss

+5
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@
1414
border-radius: 8px;
1515
opacity: 1 !important;
1616
box-shadow: 0 1px 5px $tips-shadow;
17+
18+
&.inverted {
19+
background-color: $black;
20+
color: $grey-bg;
21+
}
1722
}
1823
}

src/routes/Products/components/StyleOptions/index.jsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { v4 as uuidV4 } from "uuid";
99
import LikeIcon from "../../../../assets/images/thumbsup.svg";
1010
import DislikeIcon from "../../../../assets/images/thumbsdown.svg";
1111
import styles from "../../../../assets/data/website-design-styles.json";
12+
import HelpIcon from "../../../../components/HelpIcon"
1213
import "./styles.module.scss";
1314

1415
const StyleOptions = ({ likes = [], dislikes = [], onLike, onDislike }) => {
@@ -26,7 +27,10 @@ const StyleOptions = ({ likes = [], dislikes = [], onLike, onDislike }) => {
2627
)}
2728
>
2829
<div styleName="name">
29-
{style.name}
30+
<span>{style.name}</span> &nbsp;
31+
<HelpIcon textColor="#f4f4f4" inverted backgroundColor="#000" arrowColor="#000">
32+
{style.description}
33+
</HelpIcon>
3034
</div>
3135
<div styleName="box">
3236
<div styleName="preview" />

src/routes/Products/components/StyleOptions/styles.module.scss

+6
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,19 @@
104104

105105
.name {
106106
@include font-roboto;
107+
display: flex;
108+
justify-content: center;
107109
style: $black;
108110
font-size: 16px;
109111
font-weight: 600;
110112
line-height: 26px;
111113
text-align: center;
112114
margin-top: 8px;
113115
margin-bottom: 8px;
116+
117+
.toolTip {
118+
margin-left: 2px;
119+
}
114120
}
115121
}
116122
}

0 commit comments

Comments
 (0)