1.13.0 • Published 11 months ago
@defense-unicorns/website-commons v1.13.0
Defense Unicorns Common Svelte Components
To use the components, you'll need a Svelte application that uses tailwinds.
npm i @defense-unicorns/website-commons
After installing, update your tailwind.config.js
to include the presets and reference the library in the content
section. this will ensure the CSS is generated correctly.
import presets from '@defense-unicorns/website-commons/tw-presets'
/** @type {import('tailwindcss').Config} */
export default {
presets: [presets],
content: [
'./src/**/*.{html,js,ts,svelte}',
'./node_modules/@defense-unicorns/website-commons/**/*.{html,js,ts,svelte}'
],
...
}
Then, simply import the components.
<script>
import { Button } from '@defense-unicorns/website-commons'
</script>
<Button external text="VIEW ON GITHUB" link={links.github.url} color="green" />
tests
npm test
Tests are written in ViTest and as Storybook tests.
- Configuring Storybook tests
- See Working with the Canvas to learn more about using the canvasElement to query the DOM
1.13.0
11 months ago
1.12.0
11 months ago
1.9.0
11 months ago
1.10.0
11 months ago
1.7.0
1 year ago
1.6.0
1 year ago
1.5.0
1 year ago
1.4.0
1 year ago
1.3.7
1 year ago
1.3.8
1 year ago
1.3.5
1 year ago
1.3.4
1 year ago
1.3.3
1 year ago
1.3.2
1 year ago
1.3.1
1 year ago
1.2.3
1 year ago
1.2.1
1 year ago
1.2.0
1 year ago
1.1.1
1 year ago
1.1.0
1 year ago