Skip to content

Commit b5789e9

Browse files
fix: add missing icons to supported platforms (#4128)
1 parent 16cfcd5 commit b5789e9

4 files changed

Lines changed: 61 additions & 4 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
import React from 'react';
9+
10+
export default function VisionOS() {
11+
return (
12+
<svg
13+
width="18"
14+
height="19"
15+
viewBox="0 0 66 41"
16+
fill="none"
17+
xmlns="http://www.w3.org/2000/svg">
18+
<path
19+
d="M55.7833 4.43334C48.5833 0.833335 37.2667 0.833336 33 0.833336C28.7333 0.833336 18.2167 0.833335 11.0167 4.06667C10.3667 3 9.01666 2.53334 7.84999 3.06667C6.44999 3.7 5.44999 4.78334 5.24999 4.98334C4.36666 5.96667 4.43332 7.41667 5.33332 8.35C0.949991 13.55 -0.866675 21.5 0.566658 27.25C2.63332 35.4833 8.81666 40.8167 16.3333 40.8167C21.9 40.8167 24.65 38.7333 26.85 37.0667C27.65 36.45 28.35 35.9333 29.1167 35.55C31.7333 34.25 34.2667 34.25 36.8833 35.55C37.65 35.9333 38.35 36.45 39.15 37.0667C41.3667 38.7333 44.1 40.8167 49.6667 40.8167C57.1833 40.8167 63.3667 35.5 65.4333 27.25C67.3167 19.6833 63.6 8.31667 55.8 4.4L55.7833 4.43334ZM60.5667 26.0667C59.0833 32 54.8 35.8333 49.6667 35.8333C45.7833 35.8333 44.1 34.5667 42.1667 33.1C41.25 32.4 40.3 31.6833 39.1167 31.1C37.0833 30.0833 35.05 29.5833 33 29.5833C30.95 29.5833 28.9167 30.0833 26.8833 31.1C25.7 31.6833 24.75 32.4 23.8333 33.1C21.8833 34.5667 20.2167 35.8333 16.3333 35.8333C11.1833 35.8333 6.91666 32 5.43332 26.0667C4.06666 20.5667 6.88333 11.7 12.4667 8.91667C18.6 5.85 29.0667 5.85 33.0167 5.85C36.9667 5.85 47.4333 5.85 53.5667 8.91667C59.1333 11.7 61.9667 20.5833 60.6 26.0667H60.5667Z"
20+
fill="currentColor"
21+
/>
22+
</svg>
23+
);
24+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
import React from 'react';
9+
10+
export default function Windows() {
11+
return (
12+
<svg
13+
width="18"
14+
height="18"
15+
viewBox="0 0 48 48"
16+
version="1.1"
17+
xmlns="http://www.w3.org/2000/svg">
18+
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
19+
<g transform="translate(-400.000000, -560.000000)" fill="currentColor">
20+
<path d="M400,566.79594 L419.616154,564.132637 L419.624728,582.995574 L400.01826,583.106885 L400,566.79594 Z M419.606809,585.169154 L419.622035,604.048843 L400.01549,601.3615 L400.01439,585.042845 L419.606809,585.169154 Z M421.984711,563.784314 L447.993926,560 L447.993926,582.755916 L421.984711,582.961764 L421.984711,563.784314 Z M448,585.3466 L447.993899,608 L421.984683,604.340389 L421.94824,585.304384 L448,585.3466 Z"></path>
21+
</g>
22+
</g>
23+
</svg>
24+
);
25+
}

website/src/theme/PlatformSupport/index.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import styles from './styles.module.css';
1111
import Badge from '@site/src/theme/Badge';
1212
import Android from '@site/src/theme/Icon/Android';
1313
import Apple from '@site/src/theme/Icon/Apple';
14+
import VisionOS from '@site/src/theme/Icon/VisionOS';
15+
import Windows from '@site/src/theme/Icon/Windows';
1416
import TV from '@site/src/theme/Icon/TV';
1517
import Web from '@site/src/theme/Icon/Web';
1618

@@ -27,10 +29,16 @@ export default function PlatformSupport({platforms}) {
2729
<Badge icon={<Apple />} title="macOS" />
2830
)}
2931
{platforms.includes('tv') && <Badge icon={<TV />} title="TV" />}
30-
{platforms.includes('watchOS') && <Badge title="watchOS" />}
32+
{platforms.includes('watchOS') && (
33+
<Badge icon={<Apple />} title="watchOS" />
34+
)}
3135
{platforms.includes('web') && <Badge icon={<Web />} title="Web" />}
32-
{platforms.includes('windows') && <Badge title="Windows" />}
33-
{platforms.includes('visionOS') && <Badge title="visionOS" />}
36+
{platforms.includes('windows') && (
37+
<Badge icon={<Windows />} title="Windows" />
38+
)}
39+
{platforms.includes('visionOS') && (
40+
<Badge icon={<VisionOS />} title="visionOS" />
41+
)}
3442
</div>
3543
</div>
3644
);

website/versioned_docs/version-0.74/get-started-without-a-framework.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import PlatformSupport from '@site/src/theme/PlatformSupport';
1111

1212
import RemoveGlobalCLI from './\_remove-global-cli.md';
1313

14-
<PlatformSupport platforms={['android', 'ios', 'macOS', 'tv', 'watchOS', 'web', 'windows', 'visionOS']} />
14+
<PlatformSupport platforms={['android', 'ios', 'macOS', 'tv', 'visionOS', 'watchOS', 'web', 'windows']} />
1515

1616
If you have constraints that are not served well by a [Framework](/architecture/glossary#react-native-framework), or you prefer to write your own Framework, you can create a React Native app without using a Framework.
1717

0 commit comments

Comments
 (0)