Skip to content

Commit

Permalink
feat: UnoCSS (TailwindCSS) (Storybook only) (#61)
Browse files Browse the repository at this point in the history
* feat: unocss (wip)

* feat: unocss (storybook only)

* cleanup unocss config

* revert button.stories.tsx changes
  • Loading branch information
Razboy20 authored and doprz committed Mar 6, 2024
1 parent bb3b313 commit 85c7f78
Show file tree
Hide file tree
Showing 10 changed files with 427 additions and 11 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"airbnb-base",
"airbnb/rules/react",
"airbnb-typescript",
"@unocss",
"prettier",
],
"plugins": [
Expand Down
2 changes: 1 addition & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ExtensionRoot from 'src/views/components/common/ExtensionRoot/ExtensionRoot';
import type { Preview } from '@storybook/react';
import React from 'react';
import ExtensionRoot from 'src/views/components/common/ExtensionRoot/ExtensionRoot';

const preview: Preview = {
parameters: {
Expand Down
3 changes: 2 additions & 1 deletion .storybook/vite-storybook.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import react from '@vitejs/plugin-react-swc';
import { resolve } from 'path';
import UnoCSS from 'unocss/vite';
import Icons from 'unplugin-icons/vite';
import { defineConfig } from 'vite';

Expand All @@ -12,7 +13,7 @@ console.log(root);

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), Icons({ compiler: 'jsx', jsx: 'react' })],
plugins: [react(), UnoCSS(), Icons({ compiler: 'jsx', jsx: 'react' })],
resolve: {
alias: {
src: root,
Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"@unocss/eslint-config": "^0.58.4",
"@unocss/postcss": "^0.58.4",
"@unocss/preset-uno": "^0.58.4",
"@unocss/preset-web-fonts": "^0.58.4",
"@unocss/transformer-directives": "^0.58.4",
"@unocss/transformer-variant-group": "^0.58.4",
"@vitejs/plugin-react-swc": "^3.6.0",
"cssnano": "^6.0.3",
"cssnano-preset-advanced": "^6.0.3",
Expand All @@ -77,6 +83,7 @@
"react-devtools": "^5.0.0",
"storybook": "^7.6.12",
"typescript": "^5.3.3",
"unocss": "^0.58.4",
"unplugin-icons": "^0.18.3",
"vite": "^5.0.12",
"vite-plugin-inspect": "^0.8.3"
Expand Down
Loading

0 comments on commit 85c7f78

Please sign in to comment.