File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,19 @@ const isSupported = (
32
32
return true ;
33
33
} ;
34
34
35
+ /**
36
+ * Conditionally renders children based on platform categories.
37
+ * It filters content by checking if the current platform
38
+ * or guide matches the specified supported/not supported categories.
39
+ *
40
+ * @param supported - Array of platform categories that should show this content
41
+ * @param notSupported - Array of platform categories that should not show this content
42
+ * @param noGuides - If true, content will not be shown for platform guides
43
+ * @param children - Content to be conditionally rendered
44
+ *
45
+ * For filtering by platform categories,
46
+ * use PlatformCategorySection instead of PlatformSection.
47
+ */
35
48
export function PlatformCategorySection ( {
36
49
supported = [ ] ,
37
50
notSupported = [ ] ,
Original file line number Diff line number Diff line change @@ -37,6 +37,19 @@ const isSupported = (
37
37
return null ;
38
38
} ;
39
39
40
+ /**
41
+ * Conditionally renders children based on the current platform or guide.
42
+ *
43
+ * @param supported - Array of platform/guide keys that should show this content
44
+ * @param notSupported - Array of platform/guide keys that should not show this content
45
+ * @param noGuides - If true, content will not be shown for platform guides
46
+ * @param children - Content to be conditionally rendered
47
+ * @param platform - (Optional) Override the current platform
48
+ *
49
+ * Note: This component checks against platform and guide keys (e.g. 'python', 'react').
50
+ * For filtering by platform categories (e.g. 'browser', 'node'),
51
+ * use PlatformCategorySection instead.
52
+ */
40
53
export function PlatformSection ( {
41
54
supported = [ ] ,
42
55
notSupported = [ ] ,
You can’t perform that action at this time.
0 commit comments