Files
Modrinth-plus/README.md

65 lines
1.0 KiB
Markdown
Raw Normal View History

2022-03-09 21:27:53 -08:00
# Kleos
2022-03-07 21:55:31 -08:00
2022-03-09 21:27:53 -08:00
*The Modrinth component library, in Svelte*
2022-03-07 21:55:31 -08:00
2022-03-09 21:27:53 -08:00
---
2022-03-07 21:55:31 -08:00
2022-03-09 21:27:53 -08:00
### ⚠️ Currently in-progress ⚠️
2022-03-07 21:55:31 -08:00
2022-03-09 21:27:53 -08:00
When creating a component, start with [GitHub's Primer styles](https://github.com/primer/css/tree/main/src) for that component, and go from there. Global variables and colors are incomplete and currently identical to Primers'.
2022-03-07 21:55:31 -08:00
2022-03-09 21:27:53 -08:00
#### Components
2022-03-07 21:55:31 -08:00
2022-03-09 21:27:53 -08:00
- [ ] Button
- [ ] Select menu
- [ ] Checkboxes
- [ ] Text input
- [ ] Pagination
- [ ] Link
- [ ] Blankslate
- [ ] Breadcrumbs
- [ ] Markdown
- [ ] Textarea
- [ ] Select
2022-03-07 21:55:31 -08:00
2022-03-09 21:27:53 -08:00
...and others
## Using
2022-03-07 21:55:31 -08:00
2022-03-09 21:27:53 -08:00
Install the package:
2022-03-07 21:55:31 -08:00
```bash
2022-03-09 21:27:53 -08:00
npm install kleos # or pnpm inst...
```
Import a component:
```svelte
<script>
import { Button } from "kleos"
</script>
2022-03-07 21:55:31 -08:00
2022-03-09 21:27:53 -08:00
<Button> Click me! </Button>
2022-03-07 21:55:31 -08:00
```
2022-03-09 21:27:53 -08:00
## Developing
2022-03-07 21:55:31 -08:00
2022-03-09 21:27:53 -08:00
The library lives in the `src/lib` folder, and the documentation lives in the `src/routes` folder.
2022-03-07 21:55:31 -08:00
```bash
2022-03-09 21:27:53 -08:00
pnpm install # Install dependencies
pnpm dev # Run dev server
2022-03-07 21:55:31 -08:00
```
2022-03-09 21:27:53 -08:00
## Packaging
2022-03-07 21:55:31 -08:00
2022-03-09 21:27:53 -08:00
```bash
pnpm package
```
## Building
To build the documentation site, run:
```bash
pnpm build
```