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 = (
3232 return true ;
3333} ;
3434
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+ */
3548export function PlatformCategorySection ( {
3649 supported = [ ] ,
3750 notSupported = [ ] ,
Original file line number Diff line number Diff line change @@ -37,6 +37,19 @@ const isSupported = (
3737 return null ;
3838} ;
3939
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+ */
4053export function PlatformSection ( {
4154 supported = [ ] ,
4255 notSupported = [ ] ,
You can’t perform that action at this time.
0 commit comments