Skip to content

Commit

Permalink
fix: test files
Browse files Browse the repository at this point in the history
  • Loading branch information
hmd committed Oct 20, 2024
1 parent 8c05967 commit 1eab4ed
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 67 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
"dev": "vite dev",
"build": "vite build",
"build:demo": "vite build --mode demo",
"test": "vitest",
"test:update": "vitest -u",
"release": "bumpp --commit --push --tag",
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs",
"check-types": "tsc --pretty --noEmit",
"unocss:dev": "unocss -c uno.config.ts -o styles/uno.css --watch \"./**/*.tsx\" "
"test": "unocss -c uno.config.ts -o test-result.css --watch \"./**/*.tsx\" "
},
"repository": {
"type": "git",
Expand Down
42 changes: 7 additions & 35 deletions styles/uno.css → test-result.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 12 additions & 9 deletions test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
function Comp(){

return (
<button className=""
style={{
"dkfd": "linear-gradient(45deg,var(--un-preset-radix-red9A),var(--un-preset-radix-orange9))"
}}
>Delete</button>
)};
function Comp() {
return (
<button
className='bg-amber5'
style={{
dkfd: 'linear-gradient(45deg,var(--un-preset-radix-red9A),var(--un-preset-radix-orange9))',
}}
>
Delete
</button>
);
}
23 changes: 2 additions & 21 deletions uno.config.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
import { defineConfig, presetUno, transformerVariantGroup } from 'unocss';
import { presetRadix } from './src';
// import * as radixColors from '@radix-ui/colors';
// import presetPrimitives from "unocss-preset-primitives";
export default defineConfig({
theme: {
colors: {
subdued: 'var(--rx-slate11)',
},
breakpoints: {
xxs: '420px',
xs: '480px',
sm: '640px',
md: '768px',
},
},
transformers: [transformerVariantGroup()],
presets: [
presetUno({
dark: 'class',
}),
presetUno(),
presetRadix({
prefix: '-rx-',
// prefix: '-rx-',
darkSelector: '.my-dark-selector',
lightSelector: '.light-selector',
aliases: {
Expand All @@ -30,11 +14,8 @@ export default defineConfig({
// info: 'green'
},
useP3Colors: true,
// safelistAliases: ['danger'],
extend: true,
// useP3Colors: true,
// onlyOneTheme: 'dark',
// safelistAliases: ['warning', 'danger4A'],
// safelist: ['pink3A', 'white11A', 'blue' , 'warning', 'danger4A'],
}),
],
Expand Down

0 comments on commit 1eab4ed

Please sign in to comment.