Skip to content

Commit

Permalink
Fix extract starters (#7082)
Browse files Browse the repository at this point in the history
* Fix extract starters

* add branch filters back

---------

Co-authored-by: Reid Barber <[email protected]>
  • Loading branch information
snowystinger and reidbarber authored Sep 25, 2024
1 parent df888a6 commit 2832cf1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/extractStarter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fs.mkdirSync(`starters/docs/src`, {recursive: true});
fs.mkdirSync(`starters/docs/stories`, {recursive: true});

for (let file of glob.sync('packages/react-aria-components/docs/*.mdx')) {
if (!/^[A-Z]/.test(basename(file))) {
if (!/^[A-Z]/.test(basename(file)) || /^Tree/.test(basename(file))) {
continue;
}

Expand Down Expand Up @@ -484,6 +484,16 @@ function generateWrapper(name) {
generic = '<T>';
}

if (name === 'Disclosure' || name === 'DisclosureGroup' || name === 'DisclosurePanel') {
return `import {UNSTABLE_${name} as RAC${name}, ${typeName}} from 'react-aria-components';
import './${name}.css';
export function ${name}${typeParams}(props: ${typeName}${generic}) {
return <RAC${name} {...props} />;
}
`
}

return `import {${name} as RAC${name}, ${typeName}} from 'react-aria-components';
import './${name}.css';
Expand Down

1 comment on commit 2832cf1

@rspbot
Copy link

@rspbot rspbot commented on 2832cf1 Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.