feat: Background beams
This commit is contained in:
parent
7242a0afab
commit
db396b448a
7 changed files with 250 additions and 86 deletions
|
|
@ -2,6 +2,9 @@
|
|||
const { pick, omit } = require("lodash")
|
||||
const colors = require("tailwindcss/colors")
|
||||
const defaultTheme = require("tailwindcss/defaultTheme")
|
||||
const {
|
||||
default: flattenColorPalette,
|
||||
} = require("tailwindcss/lib/util/flattenColorPalette");
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
darkMode: "class",
|
||||
|
|
@ -104,9 +107,21 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
plugins: [
|
||||
require('@codaworks/react-glow/tailwind')
|
||||
require('@codaworks/react-glow/tailwind'),
|
||||
addVariablesForColors
|
||||
],
|
||||
future: {
|
||||
hoverOnlyWhenSupported: true,
|
||||
},
|
||||
}
|
||||
|
||||
function addVariablesForColors({ addBase, theme }) {
|
||||
let allColors = flattenColorPalette(theme("colors"));
|
||||
let newVars = Object.fromEntries(
|
||||
Object.entries(allColors).map(([key, val]) => [`--${key}`, val])
|
||||
);
|
||||
|
||||
addBase({
|
||||
":root": newVars,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue