@sjsf/daisyui-theme
v1.6.1
Published
The daisyui based theme for svelte-jsonschema-form
Downloads
790
Readme
@sjsf/daisyui-theme
The daisyui based theme for svelte-jsonschema-form.
Installation
npm install @sjsf/form @sjsf/daisyui-theme
Usage
Setup styles
There is two ways to setup styles:
- Use tailwindcss config
import daisyui from 'daisyui';
import { THEME_CONTENT } from '@sjsf/daisyui-theme/preset'
/** @type {import('tailwindcss').Config} */
export default {
content: ['./src/**/*.{html,js,svelte,ts}', THEME_CONTENT],
plugins: [daisyui],
}
Or with a preset
import themePreset from '@sjsf/daisyui-theme/preset'
/** @type {import('tailwindcss').Config} */
export default {
presets: [themePreset],
}
- Inject prepared styles (not recommended)
// Inject them as you like
import themeStyles from "@sjsf/daisyui-theme/styles.css?inline";
Apply theme
<script lang="ts">
import { useForm2 } from '@sjsf/form';
import { theme } from '@sjsf/daisyui-theme';
const form = useForm2({
...theme
})
</script>
License
MIT