Raw
1 // This config file includes the base configurations with the modified configs for UI docs
2 const coreConfig = require("./base.tailwind.config")
3
4 // modify core spacing to have "docs" prefix
5 const modifiedSpacing = {}
6 Object.entries(coreConfig.theme.spacing).forEach(([key, value]) => {
7 modifiedSpacing[`docs_${key}`] = value
8 })
9
10 // modify core border radius to have "docs" prefix
11 const modifiedRadius = {}
12 Object.entries(coreConfig.theme.extend.borderRadius).forEach(([key, value]) => {
13 modifiedRadius[`docs_${key}`] = value
14 })
15
16 /** @type {import('tailwindcss').Config} */
17 module.exports = {
18 ...coreConfig,
19 theme: {
20 ...coreConfig.theme,
21 extend: {
22 ...coreConfig.theme.extend,
23 borderRadius: {
24 ...coreConfig.theme.extend.borderRadius,
25 ...modifiedRadius,
26 },
27 },
28 spacing: {
29 ...coreConfig.theme.spacing,
30 ...modifiedSpacing,
31 },
32 },
33 }