Skip to content

Commit 068a060

Browse files
authored
Merge pull request #4361 from Codeinwp/prf/feat/blog
feat: blog archive improvements
2 parents 8126ec7 + 3c87359 commit 068a060

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2493
-1079
lines changed

assets/apps/components/src/HOC/Responsive.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@ const ResponsiveControl = (props) => {
88
const { onChange, excluded, controlLabel, hideResponsive, children } =
99
props;
1010

11+
const handleDeviceChange = (device) => {
12+
onChange(checkExcludedTablet(device));
13+
};
14+
1115
useEffect(() => {
12-
window.wp.customize.bind('ready', () => {
13-
window.wp.customize.previewedDevice.bind((newDevice) => {
14-
onChange(checkExcludedTablet(newDevice));
15-
});
16-
});
16+
wp.customize.state('previewedDevice').bind(handleDeviceChange);
17+
18+
return () => {
19+
wp.customize.state('previewedDevice').unbind(handleDeviceChange);
20+
};
1721
}, []);
1822

1923
const checkExcludedTablet = (device) => {

assets/apps/components/src/Style/_radio-image.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
border: none;
3333
padding: 0;
3434
background: 0;
35+
max-width: 70%;
36+
margin: 0 auto;
3537

3638
&.active {
3739
outline: 2px solid $wp-blue;

assets/apps/components/src/Style/_sizing.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
}
5353
}
5454

55-
label {
55+
label.label {
5656
text-transform: uppercase;
5757
font-size: 9px;
5858
text-align: center;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
const VisibilityIcon = ({ size }) => (
2+
<svg
3+
xmlns="http://www.w3.org/2000/svg"
4+
width={size}
5+
height={size}
6+
viewBox="0 0 24 24"
7+
fill="none"
8+
stroke="currentColor"
9+
strokeWidth="2"
10+
strokeLinecap="round"
11+
strokeLinejoin="round"
12+
className="lucide lucide-eye w-4 h-4 text-gray-500"
13+
>
14+
<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"></path>
15+
<circle cx="12" cy="12" r="3"></circle>
16+
</svg>
17+
);
18+
19+
const HiddenIcon = ({ size }) => (
20+
<svg
21+
xmlns="http://www.w3.org/2000/svg"
22+
width={size}
23+
height={size}
24+
viewBox="0 0 24 24"
25+
fill="none"
26+
stroke="currentColor"
27+
strokeWidth="2"
28+
strokeLinecap="round"
29+
strokeLinejoin="round"
30+
className="lucide lucide-eye-off"
31+
>
32+
<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" />
33+
<path d="M14.084 14.158a3 3 0 0 1-4.242-4.242" />
34+
<path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" />
35+
<path d="m2 2 20 20" />
36+
</svg>
37+
);
38+
39+
export { VisibilityIcon, HiddenIcon };

0 commit comments

Comments
 (0)