Skip to content

pantoken / bundlers/tailwind/src / pantokenPreset

ฟังก์ชัน: pantokenPreset()

pantokenPreset(options?): TailwindPreset

ทดลอง

สร้าง preset ของ pantoken Tailwind.

พารามิเตอร์

options?

PantokenPresetOptions = {}

PantokenPresetOptions.

คืนค่า

TailwindPreset

preset ของ Tailwind ที่เพิ่ม colors, spacing และ fontFamily.

ตัวอย่าง

ลงทะเบียน preset ใน tailwind.config.ts

ts
import { pantokenPreset } from "@pantoken/tailwind";

export default {
  presets: [pantokenPreset()],
  content: ["./src/**/*.{ts,tsx}"],
};
// then use utilities like `bg-color-background-base p-space-md`

ยังเผยพาเลตต์ primitive ภายใต้คำนำหน้า primitive-

ts
import { pantokenPreset } from "@pantoken/tailwind";

export default {
  presets: [pantokenPreset({ includePrimitives: true })],
};