cschroeter / park-ui

Beautifully designed components built with Ark UI and Panda CSS that work with a variety of JS frameworks.
https://park-ui.com
MIT License
1.63k stars 71 forks source link

[Feature] Add index file for components folder #350

Closed Xelson closed 2 months ago

Xelson commented 3 months ago

This will make it possible to export compound components via the IDE.

Using Select as a example, by default it can be exported like this

import * as Select from '~/components/ui/select'

But we can move on to named exports with index.ts re-export approach:

~/components/index.ts:

export * as Select from './select';

Usage anywhere now:

import { Select } from './components/ui'
cschroeter commented 2 months ago

@Xelson

As of v0.7.0, the CLI now handles index files. Give it a try!