Skip to content

Commit

Permalink
simplify prefix separator
Browse files Browse the repository at this point in the history
  • Loading branch information
endigma committed Jan 20, 2025
1 parent f43a4d6 commit fcaabde
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ export interface PresetRadixOptions {
palette: readonly RadixColors[];
/**
* The prefix of the generated css variables
* @default --un-preset-radix
* @default "--un-preset-radix-"
*/
prefix?: string;

/**
* Customize the prefix of the generated variants
* @default "radix"
* @default "radix-"
*/
variantPrefix?: string;

Expand Down Expand Up @@ -60,7 +60,7 @@ function dataVariant(
attribute: string,
selector: string
): Variant {
return variantMatcher(`${prefix}${Boolean(prefix) ? '-' : ''}${attribute}`, (input) => ({
return variantMatcher(`${prefix}${attribute}`, (input) => ({
selector: `${input.selector}${selector}`,
}));
}
Expand All @@ -70,7 +70,7 @@ export const presetRadix = definePreset((options: PresetRadixOptions) => {
prefix = "--un-preset-radix-",
darkSelector = ".dark-theme",
lightSelector = ":root, .light-theme",
variantPrefix = "radix",
variantPrefix = "radix-",
palette: selectedColors,
aliases: selectedAliases = {},
extend = false,
Expand Down

0 comments on commit fcaabde

Please sign in to comment.