# @defense-unicorns/website-commons

> To use the components, you'll need a Svelte application that uses tailwinds.

Latest version **2.0.1** (published 2024-11-22) · 0 weekly downloads

## Install

```sh
npm install @defense-unicorns/website-commons
pnpm add @defense-unicorns/website-commons
yarn add @defense-unicorns/website-commons
bun add @defense-unicorns/website-commons
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2024-11-22 |
| First published | 2024-04-23 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=20 |
| Dependencies | 9 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Defense Unicorns |
| Maintainers | bfinster-du, cole-w |

## Links

- npm: https://www.npmjs.com/package/@defense-unicorns/website-commons
- Repository: https://github.com/defenseunicorns/website-commons
- Homepage: https://github.com/defenseunicorns/website-commons#readme
- Issues: https://github.com/defenseunicorns/website-commons/issues
- npm.io page: https://npm.io/package/@defense-unicorns/website-commons

## Dependencies (9)

- [eslint](https://npm.io/package/eslint.md) 9.15.0
- [globals](https://npm.io/package/globals.md) 15.12.0
- [prettier](https://npm.io/package/prettier.md) 3.3.3
- [eslint-plugin-svelte](https://npm.io/package/eslint-plugin-svelte.md) 2.46.0
- [eslint-config-prettier](https://npm.io/package/eslint-config-prettier.md) 9.1.0
- [prettier-plugin-svelte](https://npm.io/package/prettier-plugin-svelte.md) 3.3.2
- [prettier-plugin-sort-json](https://npm.io/package/prettier-plugin-sort-json.md) 4.0.0
- [prettier-plugin-tailwindcss](https://npm.io/package/prettier-plugin-tailwindcss.md) 0.6.9
- [@commitlint/config-conventional](https://npm.io/package/@commitlint/config-conventional.md) 19.6.0

## Recent versions

- 2.0.1 (latest) — 2024-11-22
- 1.14.1 — 2024-11-05
- 1.14.0 — 2024-11-05
- 1.13.0 — 2024-10-03
- 1.12.0 — 2024-10-03
- 1.10.0 — 2024-10-03
- 1.9.0 — 2024-09-25
- 1.7.0 — 2024-06-17
- 1.6.0 — 2024-05-20
- 1.5.0 — 2024-05-20
- 1.4.0 — 2024-05-13
- 1.3.8 — 2024-05-09
- 1.3.7 — 2024-05-09
- 1.3.5 — 2024-05-08
- 1.3.4 — 2024-05-08
- … 8 more at https://npm.io/package/@defense-unicorns/website-commons/versions

## README

# 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.

```js
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.

```js
<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](https://storybook.js.org/docs/writing-tests/test-runner)
- See [Working with the Canvas](https://storybook.js.org/docs/writing-stories/play-function#working-with-the-canvas) to learn more about using the canvasElement to query the DOM

---
_Source: https://npm.io/package/@defense-unicorns/website-commons · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
