Skip to content

Commit

Permalink
feat(markdown): usage without tailwindcss (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonom authored Jul 14, 2024
1 parent d711b3f commit 0bc5d9f
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/lazy-peaches-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@assistant-ui/react-markdown": patch
---

feat(markdown): usage without tailwindcss
5 changes: 5 additions & 0 deletions packages/react-markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,14 @@
}
},
"devDependencies": {
"@assistant-ui/tailwindcss-transformer": "workspace:^",
"@assistant-ui/tsconfig": "workspace:*",
"@types/node": "^20.14.10",
"autoprefixer": "^10.4.19",
"eslint-config-next": "14.2.5",
"postcss": "^8.4.39",
"tailwindcss": "^3.4.4",
"tailwindcss-animate": "^1.0.7",
"tsup": "^8.1.0",
"tsx": "^4.16.2"
},
Expand Down
10 changes: 10 additions & 0 deletions packages/react-markdown/postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
autoprefixer: {},
"@assistant-ui/tailwindcss-transformer": {},
},
};

export default config;
58 changes: 58 additions & 0 deletions packages/react-markdown/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import type { Config } from "tailwindcss";
import animatePlugin from "tailwindcss-animate";

const config = {
content: ["./src/**/*.{ts,tsx}", "./components/**/*.{ts,tsx}"],
corePlugins: {
backgroundOpacity: false,
touchAction: false,
scrollSnapType: false,
gradientColorStops: false,
fontVariantNumeric: false,
ringOffsetWidth: false,
ringOffsetColor: false,
ringOpacity: false,
boxShadowColor: false,
blur: false,
brightness: false,
contrast: false,
grayscale: false,
hueRotate: false,
invert: false,
saturate: false,
sepia: false,
dropShadow: false,
backdropBlur: false,
backdropBrightness: false,
backdropContrast: false,
backdropGrayscale: false,
backdropHueRotate: false,
backdropInvert: false,
backdropOpacity: false,
backdropSaturate: false,
backdropSepia: false,
container: false,
},
theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: {
borderRadius: {
lg: "var(--aui-radius)",
md: "calc(var(--aui-radius) - 2px)",
sm: "calc(var(--aui-radius) - 4px)",
},
},
},
plugins: [
animatePlugin,
require("@assistant-ui/react/tailwindcss")({ components: [] }),
],
} satisfies Config;

export default config;
21 changes: 18 additions & 3 deletions pnpm-lock.yaml

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

0 comments on commit 0bc5d9f

Please sign in to comment.