Files
Modrinth-plus/README.md

65 lines
1.1 KiB
Markdown
Raw Normal View History

# Omorphia
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-13 23:39:06 -07:00
### ⚠️ Currently in-progress: Not accepting contributions currently.
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
npm install omorphia # or pnpm inst...
2022-03-09 21:27:53 -08:00
```
Import a component:
```svelte
<script>
import { Button } from "omorphia"
2022-03-09 21:27:53 -08:00
</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
```