|
| 1 | +<script lang="ts"> |
| 2 | + import Preview from '$docs/Preview.svelte'; |
| 3 | +</script> |
| 4 | + |
| 5 | +<h1>Usage</h1> |
| 6 | + |
| 7 | +```js |
| 8 | +const colors = require('tailwindcss/colors'); |
| 9 | +const layerstack = require('@layerstack/tailwind/plugin'); |
| 10 | + |
| 11 | +/** @type {import('tailwindcss').Config}*/ |
| 12 | +const config = { |
| 13 | + content: ['./src/**/*.{html,svelte}', './node_modules/svelte-ux/**/*.{svelte,js}'], |
| 14 | + ux: { |
| 15 | + // see also: https://svelte-ux.techniq.dev/customization |
| 16 | + themes: { |
| 17 | + // light mode |
| 18 | + light: { |
| 19 | + primary: colors['emerald']['600'], |
| 20 | + 'primary-content': 'white', |
| 21 | + secondary: colors['blue']['500'], |
| 22 | + 'surface-100': 'white', |
| 23 | + 'surface-200': colors['gray']['100'], |
| 24 | + 'surface-300': colors['gray']['300'], |
| 25 | + 'surface-content': colors['gray']['900'], |
| 26 | + }, |
| 27 | + // dark mode |
| 28 | + dark: { |
| 29 | + primary: colors['emerald']['600'], |
| 30 | + 'primary-content': 'white', |
| 31 | + secondary: colors['blue']['500'], |
| 32 | + 'surface-100': colors['zinc']['800'], |
| 33 | + 'surface-200': colors['zinc']['900'], |
| 34 | + 'surface-300': colors['zinc']['950'], |
| 35 | + 'surface-content': colors['zinc']['100'], |
| 36 | + }, |
| 37 | + }, |
| 38 | + }, |
| 39 | + plugins: [layerstack], |
| 40 | +}; |
| 41 | + |
| 42 | +module.exports = config; |
| 43 | +``` |
0 commit comments