Closed Xelson closed 2 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
Select
import * as Select from '~/components/ui/select'
But we can move on to named exports with index.ts re-export approach:
index.ts
~/components/index.ts:
export * as Select from './select';
Usage anywhere now:
import { Select } from './components/ui'
@Xelson
As of v0.7.0, the CLI now handles index files. Give it a try!
v0.7.0
This will make it possible to export compound components via the IDE.
Using
Select
as a example, by default it can be exported like thisBut we can move on to named exports with
index.ts
re-export approach:~/components/index.ts:
Usage anywhere now: