Skip to content

Commit

Permalink
docs: Added Accordion docs STC-732 (#187)
Browse files Browse the repository at this point in the history
* docs: Added Accordion docs STC-732

* chore: restore styleguidist docs files STC-732
  • Loading branch information
giubatt authored Mar 15, 2022
1 parent 2dc956a commit 052501b
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 17 deletions.
4 changes: 0 additions & 4 deletions plop-templates/docs/component.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# {{pascalCase componentName}}

## Component

Here goes the {{pascalCase componentName}} description.

## First level Category
Expand Down
64 changes: 64 additions & 0 deletions website/docs/components/Accordion.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
The Accordion component is a list of collapsible items where only one can be open at a time.

## Basic Example
```jsx live
<Accordion>
<Accordion.Item title="General Settings">General Settings Content</Accordion.Item>
<Accordion.Item title="Users">User content</Accordion.Item>
</Accordion>
```

## Initially open
```jsx live
<Accordion initialOpenIndex={1}>
<Accordion.Item title="General Settings">General Settings Content</Accordion.Item>
<Accordion.Item title="Users">User content</Accordion.Item>
</Accordion>
```

## Different active background color

### Primary
```jsx live
<Accordion activeBackgroundColor="primary">
<Accordion.Item title="General Settings">General Settings Content</Accordion.Item>
<Accordion.Item title="Users">User content</Accordion.Item>
</Accordion>
```

### Secondary
```jsx live
<Accordion activeBackgroundColor="secondary">
<Accordion.Item title="General Settings">General Settings Content</Accordion.Item>
<Accordion.Item title="Users">User content</Accordion.Item>
</Accordion>
```

### Text
```jsx live
<Accordion activeBackgroundColor="text">
<Accordion.Item title="General Settings">General Settings Content</Accordion.Item>
<Accordion.Item title="Users">User content</Accordion.Item>
</Accordion>
```

### Success
```jsx live
<Accordion activeBackgroundColor="success">
<Accordion.Item title="General Settings">General Settings Content</Accordion.Item>
<Accordion.Item title="Users">User content</Accordion.Item>
</Accordion>
```

### Warning
```jsx live
<Accordion activeBackgroundColor="warning">
<Accordion.Item title="General Settings">General Settings Content</Accordion.Item>
<Accordion.Item title="Users">User content</Accordion.Item>
</Accordion>
```


## API

- [Accordion](/docs/apis/accordion)
4 changes: 0 additions & 4 deletions website/docs/components/Button.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Button

## Component

This is the basic component for all buttons.

## Variants
Expand Down
2 changes: 2 additions & 0 deletions website/docs/components/Card.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
The Card component is a basic variation of the Paper, with a title and actions on the footer.

## Examples

### Basic Example
```jsx live
<Card
Expand Down
6 changes: 2 additions & 4 deletions website/docs/components/Divider.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Divider

## Component

The Divider component is used as a separator horizontally or vertically.

## Variants

### Horizontal
```jsx live
<div style={{ display: "flex", flexDirection: "column", gap: 8 }}>
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@docusaurus/theme-live-codeblock": "^2.0.0-beta.13",
"@emotion/react": "^11.4.1",
"@mdx-js/react": "^1.6.21",
"@micromed/herz-ui": "^0.20.4",
"@micromed/herz-ui": "^0.21.1",
"@svgr/webpack": "^5.5.0",
"clsx": "^1.1.1",
"docusaurus-plugin-react-docgen-typescript": "^0.1.0",
Expand Down
8 changes: 4 additions & 4 deletions website/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1716,10 +1716,10 @@
resolved "https://registry.yarnpkg.com/@mdx-js/util/-/util-1.6.22.tgz#219dfd89ae5b97a8801f015323ffa4b62f45718b"
integrity sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA==

"@micromed/herz-ui@^0.20.4":
version "0.20.4"
resolved "https://registry.yarnpkg.com/@micromed/herz-ui/-/herz-ui-0.20.4.tgz#73794e87f6e520471cd91a24f17d049870385fa5"
integrity sha512-6hhMkSm5XQ0b5lnTR6owrChFAduSQ92jA9gx2+0ZR2MQ6vflgm3Khz1Rn2cNblYo7nG6mNWRdG9xveadBGzWfg==
"@micromed/herz-ui@^0.21.1":
version "0.21.1"
resolved "https://registry.yarnpkg.com/@micromed/herz-ui/-/herz-ui-0.21.1.tgz#7081a8f362d741c30a153d1a8dd0eeba4f070f09"
integrity sha512-vto8ahhPI/xb8Q9jnrXVj2fmiMvvf8NrfXcV/leVcwp2wJ+kuKYiGURaNRNr+PsQ0/Jst4vFdyoXtb097jXsEg==
dependencies:
"@reach/dialog" "^0.16.2"
"@tabler/icons" "^1.41.2"
Expand Down

1 comment on commit 052501b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for herzui ready!

✅ Preview
https://herzui-l43aovzi8-micromed.vercel.app

Built with commit 052501b.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.