Skip to content

Commit

Permalink
docs: add pages for each component, plus mkdocs entry
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Nov 29, 2023
1 parent f72dc98 commit 11709b3
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 6 deletions.
13 changes: 13 additions & 0 deletions docs/components/button.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Button

A button component, used to trigger events.

## Extra Info

Extra info here.

## Props

| Property | Type | Description |
| ---------- | --------- | ---------------------------------------------- |
| `disabled` | `boolean` | Disable the button, greyed out, not clickable. |
8 changes: 8 additions & 0 deletions docs/components/card.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Card

A card component to embed in your page.

## Props

| Property | Type | Description |
| -------- | ---- | ----------- |
9 changes: 9 additions & 0 deletions docs/components/dropdown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Dropdown

A dropdown component to display a list of values for selection.

## Props

| Property | Type | Description |
| --------- | ------- | -------------------------------------- |
| `options` | `Array` | The available options in the dropdown. |
5 changes: 0 additions & 5 deletions docs/components/example.md

This file was deleted.

8 changes: 8 additions & 0 deletions docs/components/logo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Logo

The HOTOSM logo to embed in a webpage.

## Props

| Property | Type | Description |
| -------- | ---- | ----------- |
11 changes: 11 additions & 0 deletions docs/components/popup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Popup

A popup component, shown at the side of the viewport.

Used to display things such as cookie banners.

## Props

| Property | Type | Description |
| ---------- | ---------------- | -------------------- |
| `children` | `ReactReactNode` | Nest child elements. |
9 changes: 9 additions & 0 deletions docs/components/toggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Toggle

A toggle component, to trigger an event on click.

## Props

| Property | Type | Description |
| --------- | --------- | ----------------------------------------------- |
| `checked` | `boolean` | Set the state of the toggle: checked/unchecked. |
7 changes: 6 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ plugins:
nav:
- Home: index.md
- Components:
- Example: components/example.md
- Button: components/button.md
- Card: components/card.md
- Dropdown: components/dropdown.md
- Logo: components/logo.md
- Popup: components/popup.md
- Toggle: components/toggle.md
- Visual: visual.md
- License: LICENSE
- Changelog: CHANGELOG.md

0 comments on commit 11709b3

Please sign in to comment.