Skip to content

Commit

Permalink
Expose tailwind preset as separated submodule for node
Browse files Browse the repository at this point in the history
  • Loading branch information
JunichiSugiura committed Aug 7, 2024
1 parent 3ad8fff commit ef25398
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
10 changes: 0 additions & 10 deletions examples/starknet-react-next/tailwind.config.js

This file was deleted.

12 changes: 12 additions & 0 deletions examples/starknet-react-next/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { cartridgeTWPreset } from "@cartridge/ui-next/preset";
import { Config } from "tailwindcss";

const config = {
content: [
"./src/**/*.{ts,tsx}",
"./node_modules/@cartridge/ui-next/**/*.{js,jsx}",
],
presets: [cartridgeTWPreset],
} satisfies Config;

export default config;
4 changes: 4 additions & 0 deletions packages/ui-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
"import": "./dist/index.js",
"types": "./dist/index.d.js"
},
"./preset": {
"require": "./dist/preset.js",
"types": "./dist/preset.d.js"
},
"./themes/default.css": "./dist/themes/default.css",
"./themes/dark.css": "./dist/themes/dark.css",
"./themes/fonts.css": "./dist/themes/fonts.css"
Expand Down
1 change: 0 additions & 1 deletion packages/ui-next/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from "./components";
export * from "./preset";
export * from "./utils";
2 changes: 1 addition & 1 deletion packages/ui-next/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Config } from "tailwindcss";
import { cartridgeTWPreset } from "./src";
import { cartridgeTWPreset } from "./src/preset";

const config = {
darkMode: "class",
Expand Down

0 comments on commit ef25398

Please sign in to comment.