Skip to content

Commit

Permalink
feat: adds tailwindcss-radix-colors (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
ixahmedxi committed Jul 1, 2023
1 parent 9e2e862 commit db95ce9
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 73 deletions.
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": true
"editor.formatOnSave": true,
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
]
}
2 changes: 1 addition & 1 deletion apps/web/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default function Document() {
return (
<Html>
<Head />
<body className="bg-gray-1 text-gray-12">
<body className="bg-gray-1 dark:bg-graydark-1 text-gray-12 dark:text-graydark-12">
<Main />
<NextScript />
</body>
Expand Down
3 changes: 2 additions & 1 deletion packages/config/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"@storybook/types": "^7.0.24"
},
"devDependencies": {
"@noodle/tsconfig": "workspace:^"
"@noodle/tsconfig": "workspace:^",
"@storybook/addon-viewport": "^7.0.24"
},
"volta": {
"extends": "../../../package.json"
Expand Down
4 changes: 4 additions & 0 deletions packages/config/storybook/src/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { withThemeByClassName } from '@storybook/addon-styling';
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
import { type Preview } from '@storybook/react';

export const basePreview = {
Expand All @@ -10,6 +11,9 @@ export const basePreview = {
date: /Date$/,
},
},
viewport: {
viewports: INITIAL_VIEWPORTS,
},
},
decorators: [
withThemeByClassName({
Expand Down
4 changes: 1 addition & 3 deletions packages/config/tailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@
"devDependencies": {
"@noodle/tsconfig": "workspace:^",
"@radix-ui/colors": "^1.0.0",
"@tailwindcss/typography": "^0.5.9",
"autoprefixer": "^10.4.14",
"tailwindcss-animate": "^1.0.6",
"windy-radix-palette": "^0.6.1",
"windy-radix-typography": "^0.2.1"
"tailwindcss-radix-colors": "^0.5.0"
},
"volta": {
"extends": "../../../package.json"
Expand Down
4 changes: 1 addition & 3 deletions packages/config/tailwind/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ const config = {
extend: {},
},
plugins: [
require('windy-radix-palette'),
require('@tailwindcss/typography'),
require('windy-radix-typography'),
require('tailwindcss-radix-colors'),
require('tailwindcss-animate'),
],
} satisfies Config;
Expand Down
5 changes: 3 additions & 2 deletions packages/storybook/.storybook/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@tailwind components;
@tailwind utilities;

html {
@apply bg-gray-1 text-gray-12;
html,
body {
@apply bg-gray-1 dark:bg-graydark-1 text-gray-12 dark:text-graydark-12 h-full;
}
9 changes: 3 additions & 6 deletions packages/ui/.storybook/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
@tailwind components;
@tailwind utilities;

html.dark {
@apply bg-gray-12 text-gray-1;
}

html {
@apply bg-gray-1 text-gray-12;
html,
body {
@apply bg-gray-1 dark:bg-graydark-1 text-gray-12 dark:text-graydark-12 h-full;
}
2 changes: 1 addition & 1 deletion packages/ui/src/typography/typography.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const Typography = () => {
return <p className="text-crimson-11 dark:text-red-10">Button</p>;
return <p className="text-crimson-11 dark:text-crimsondark-11">Button</p>;
};
76 changes: 21 additions & 55 deletions pnpm-lock.yaml

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

2 comments on commit db95ce9

@kiraj20
Copy link

@kiraj20 kiraj20 commented on db95ce9 Jul 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kiraj20
Copy link

@kiraj20 kiraj20 commented on db95ce9 Jul 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.