Skip to content

Commit 27c2889

Browse files
Merge pull request #7532 from JayH25/fix-light-mode-integrations
Fix: Support light mode visibility for Integrations honeycomb grid
2 parents 8a75d02 + f2ebc2e commit 27c2889

File tree

2 files changed

+35
-34
lines changed

2 files changed

+35
-34
lines changed

src/sections/Meshery/Meshery-integrations/Integration.style.js

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ export const HoneycombGrid = styled.div`
1515
}
1616
1717
.search-box {
18-
input {
19-
border: 1px solid ${props => props.theme.headingColor} !important;
20-
21-
&:focus {
22-
border-color: #fff !important;
23-
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px !important;
24-
}
18+
input {
19+
border: 1px solid ${(props) => props.theme.headingColor} !important;
20+
21+
&:focus {
22+
border-color: #fff !important;
23+
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px !important;
24+
}
2525
}
2626
}
27-
27+
2828
.category {
2929
display: flex;
3030
flex-wrap: wrap;
@@ -34,14 +34,14 @@ export const HoneycombGrid = styled.div`
3434
}
3535
3636
.items {
37-
background-color: #D2D8DA; //#E7EFF3;
37+
background-color: #d2d8da; //#E7EFF3;
3838
padding: 0.625rem 1.5625rem;
3939
border-radius: 0.625rem;
4040
text-transform: uppercase;
4141
color: #1e2117;
4242
font-size: 0.875rem;
4343
cursor: pointer;
44-
transition: all .1s ease-in-out;
44+
transition: all 0.1s ease-in-out;
4545
4646
&:hover {
4747
opacity: 0.8;
@@ -65,7 +65,8 @@ export const HoneycombGrid = styled.div`
6565
-webkit-transform: translateZ(0);
6666
display: flex;
6767
height: 100%;
68-
background: ${(props) => props.theme.radialToBlue};
68+
background: ${(props) =>
69+
props.isDark ? props.theme.radialToBlue : props.theme.grey212121ToWhite};
6970
justify-content: center;
7071
align-items: center;
7172
padding: 0.625rem;
@@ -109,7 +110,7 @@ export const HoneycombGrid = styled.div`
109110
opacity: 0;
110111
font-weight: 600;
111112
transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
112-
padding:10px;
113+
padding: 10px;
113114
}
114115
.learnMoreBtn {
115116
padding: 5px 10px;
@@ -174,7 +175,7 @@ export const IntegrationsWrapper = styled.div`
174175
min-height: 300px; /* Add explicit min-height */
175176
position: relative; /* Add position for better layout control */
176177
width: 100%; /* Add explicit width */
177-
178+
178179
.seeAllBtn {
179180
&:hover {
180181
color: white;
@@ -220,9 +221,10 @@ export const IntegrationCard = styled.div`
220221
`;
221222

222223
export const IntegrationSlider = styled(Slider)`
223-
.slick-prev:hover, .slick-next:hover{
224+
.slick-prev:hover,
225+
.slick-next:hover {
224226
box-shadow: none;
225-
outline:none;
227+
outline: none;
226228
}
227229
228230
.slick-arrow {
@@ -254,19 +256,19 @@ export const IntegrationSlider = styled(Slider)`
254256
255257
.slick-slide {
256258
width: auto !important;
257-
margin: 0 .5rem;
259+
margin: 0 0.5rem;
258260
}
259261
260-
.slick-next{
262+
.slick-next {
261263
right: -2.5rem;
262264
}
263265
264-
.slick-prev{
266+
.slick-prev {
265267
left: -2.5rem;
266268
}
267269
268270
.slick-prev:before {
269-
content:"‹";
271+
content: "‹";
270272
line-height: 0;
271273
opacity: 1;
272274
}
@@ -281,7 +283,8 @@ export const IntegrationSlider = styled(Slider)`
281283
opacity: 1;
282284
}
283285
284-
.slick-prev, .slick-next {
286+
.slick-prev,
287+
.slick-next {
285288
top: 1.5rem;
286289
}
287-
`;
290+
`;

src/sections/Meshery/Meshery-integrations/IntegrationsGrid.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import EmptyResources from "../../Resources/Resources-error/emptyStateTemplate";
77
import { Honeycomb, Hexagon } from "./Honeycomb/Honeycomb";
88
import { useStyledDarkMode } from "../../../theme/app/useStyledDarkMode";
99

10-
1110
const IntegrationsGrid = ({ category, count }) => {
1211
const data = useStaticQuery(graphql`
1312
query {
@@ -56,18 +55,18 @@ const IntegrationsGrid = ({ category, count }) => {
5655
infinite: false,
5756
arrows: true,
5857
slidesToShow: 3,
59-
}
58+
},
6059
},
6160
{
6261
breakpoint: 500,
6362
settings: {
6463
initialSlide: 0,
6564
arrows: true,
6665
infinite: false,
67-
slidesToShow: 1.5
68-
}
69-
}
70-
]
66+
slidesToShow: 1.5,
67+
},
68+
},
69+
],
7170
};
7271

7372
const [searchQuery, setSearchQuery] = useState("");
@@ -76,7 +75,7 @@ const IntegrationsGrid = ({ category, count }) => {
7675
setSearchQuery,
7776
searchQuery,
7877
["frontmatter", "title"],
79-
["frontmatter", "title"]
78+
["frontmatter", "title"],
8079
);
8180
const [activeIntegrationList, setIntegrationList] = useState([]);
8281
const [hideFilter, setHideFilter] = useState(false);
@@ -91,7 +90,7 @@ const IntegrationsGrid = ({ category, count }) => {
9190
}
9291
return initCategory;
9392
},
94-
[]
93+
[],
9594
);
9695

9796
const categoryCount = (categoryName) => {
@@ -217,7 +216,7 @@ const IntegrationsGrid = ({ category, count }) => {
217216
};
218217

219218
return (
220-
<HoneycombGrid>
219+
<HoneycombGrid isDark={isDark}>
221220
<section className="heading">
222221
<h1>
223222
{Math.ceil(data.allMdx.nodes.length / 10) * 10}+ Built-In Integrations
@@ -233,7 +232,7 @@ const IntegrationsGrid = ({ category, count }) => {
233232
focusSearch={false}
234233
/>
235234

236-
<section style={{ "margin": "0 2.6rem" }}>
235+
<section style={{ margin: "0 2.6rem" }}>
237236
<IntegrationSlider {...settings}>
238237
{!hideFilter &&
239238
categoryNameList.map((item) => {
@@ -266,13 +265,12 @@ const IntegrationsGrid = ({ category, count }) => {
266265
const status =
267266
item.frontmatter.status === "InProgress" ? true : false;
268267
const integrationIcon = item.frontmatter.integrationIcon.publicURL;
269-
const darkModeIntegrationIcon =
270-
item.frontmatter.integrationIcon;
268+
const darkModeIntegrationIcon = item.frontmatter.integrationIcon;
271269
if (status) {
272270
return (
273271
<Hexagon
274272
className="container-inactive"
275-
style={{ background: "#A0AAAA" }}
273+
style={{ background: isDark ? "#A0AAAA" : "#EEEEEE" }}
276274
>
277275
<span className="integration-container">
278276
<img

0 commit comments

Comments
 (0)