good first issue
Repository metrics
- Stars
- (391 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
It would be amazing if you could expose the types to typescript.
Currently, if you do something like:
import {presetShadcn} from "unocss-preset-shadcn";
const shadcnColors = {
name: 'test',
light: {
// ...
},
dark: {
// ...
}
};
export default defineConfig({
// ...
presets: [
// ...
presetShadcn(
{
color: shadcnColors,
}
)
],
// ...
});
typescript will present an error.
the best way to fix this would be if unocss-preset-shadcn exported types like ThemeCSSVarsVariant or ShadcnThemeColor so you could do:
import {presetShadcn, ThemeCSSVarsVariant} from "unocss-preset-shadcn";
const shadcnColors = {
name: 'test',
light: {
// ...
},
dark: {
// ...
}
} satisfies ThemeCSSVarsVariant;
export default defineConfig({
// ...
presets: [
// ...
presetShadcn(
{
color: shadcnColors,
}
)
],
// ...
});