Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add documentation component accordion #140

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = withNextra({
return [
{
source: '/docs',
destination: '/docs/getting-started',
destination: '/docs/introduction',
statusCode: 301,
},
]
Expand Down
12 changes: 11 additions & 1 deletion docs/pages/docs/_meta.en-US.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
{
"getting-started": "Getting Started"
"-- 1": {
"type": "separator",
"title": "Getting Started"
},
"introduction": "Introduction",
"installation": "Installation",
"-- 2": {
"type": "separator",
"title": "Components"
},
"accordion": ""
}
57 changes: 57 additions & 0 deletions docs/pages/docs/accordion.en-US.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Accordion
---
import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from '@openui-org/react/components'

# Accordion

A vertically stacked set of interactive headings that each reveal a section of content.

## Usage

```jsx
import * as React from "react";
import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from '@openui-org/react/components'

function App() {
return (
<Accordion type="multiple">
<AccordionItem value="example">
<AccordionTrigger>
Use accordion?
</AccordionTrigger>
<AccordionContent>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Explicabo, voluptatum?
</AccordionContent>
</AccordionItem>
</Accordion>
);
}
```

### Preview

<br/>

<div className='mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 relative rounded-md border'>

<div className='theme-zinc w-full'>


<div className='preview flex min-h-[350px] w-full justify-center p-20 items-center'>
<div className="w-full">
<Accordion type="multiple">
<AccordionItem value="example">
<AccordionTrigger>
Use accordion?
</AccordionTrigger>
<AccordionContent>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Explicabo, voluptatum?
</AccordionContent>
</AccordionItem>
</Accordion>

</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { Callout, Tabs, Tab } from 'nextra-theme-docs'
import { Button } from '@openui-org/react/components'

# Getting Started

## Installation
# Installation

Requirements:

Expand Down
57 changes: 57 additions & 0 deletions docs/pages/docs/introduction.en-US.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Introduction
description: Open UI. OpenLand's official framework design system 🎨.
---

import {Accordion, AccordionItem, AccordionTrigger, AccordionContent} from '@openui-org/react/components'

# Introduction

Open UI. OpenLand's official framework design system. This is a non-profit library developed with existing standard concepts.

**What is the reason for creating a new component library??**

Thanks to existing libraries like [shadcn](https://ui.shadcn.com), it allows us the ease of creating a completely easy and customizable design system, our team wanted to take a step forward.

## FAQ

<Accordion type="multiple">

<AccordionItem value="faq-1">
<AccordionTrigger>
Who maintains Open UI?
</AccordionTrigger>
<AccordionContent>
Open UI is maintained by a group of friends who develop non-profit software all for educational and learning purposes in this incredible world.
</AccordionContent>
</AccordionItem>

<AccordionItem value="faq-2">
<AccordionTrigger>
Will there be support for other popular libraries in the future?
</AccordionTrigger>
<AccordionContent>
Yeah. That's right, the frontend world is full of popular and excellent libraries and for us it is very important to be around those wonderful tools
</AccordionContent>
</AccordionItem>

<AccordionItem value="faq-3">
<AccordionTrigger>
Is there an inspiration in the creation of Open UI?
</AccordionTrigger>
<AccordionContent>
Forks. All modern and most used libraries [nextui](https://nextui.org/), [headlessui](https://headlessui.com/), [chakra ui](https://v2.chakra-ui.com/)
</AccordionContent>
</AccordionItem>

<AccordionItem value="faq-4">
<AccordionTrigger>
What will be the future of Open UI?
</AccordionTrigger>
<AccordionContent>
Open UI is a totally new library. We plan to continue maintaining the library, especially improving the quality of our components.
</AccordionContent>

</AccordionItem>

</Accordion>
57 changes: 57 additions & 0 deletions docs/pages/docs/introduction.es-ES.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Introduction
description: Open UI. OpenLand's official framework design system 🎨.
---

import {Accordion, AccordionItem, AccordionTrigger, AccordionContent} from '@openui-org/react/components'

# Introduction

Open UI. OpenLand's official framework design system. This is a non-profit library developed with existing standard concepts.

**What is the reason for creating a new component library??**

Thanks to existing libraries like [shadcn](https://ui.shadcn.com), it allows us the ease of creating a completely easy and customizable design system, our team wanted to take a step forward.

## FAQ

<Accordion type="multiple">

<AccordionItem value="faq-1">
<AccordionTrigger>
Who maintains Open UI?
</AccordionTrigger>
<AccordionContent>
Open UI is maintained by a group of friends who develop non-profit software all for educational and learning purposes in this incredible world.
</AccordionContent>
</AccordionItem>

<AccordionItem value="faq-2">
<AccordionTrigger>
Will there be support for other popular libraries in the future?
</AccordionTrigger>
<AccordionContent>
Yeah. That's right, the frontend world is full of popular and excellent libraries and for us it is very important to be around those wonderful tools
</AccordionContent>
</AccordionItem>

<AccordionItem value="faq-3">
<AccordionTrigger>
Is there an inspiration in the creation of Open UI?
</AccordionTrigger>
<AccordionContent>
Forks. All modern and most used libraries [nextui](https://nextui.org/), [headlessui](https://headlessui.com/), [chakra ui](https://v2.chakra-ui.com/)
</AccordionContent>
</AccordionItem>

<AccordionItem value="faq-4">
<AccordionTrigger>
What will be the future of Open UI?
</AccordionTrigger>
<AccordionContent>
Open UI is a totally new library. We plan to continue maintaining the library, especially improving the quality of our components.
</AccordionContent>

</AccordionItem>

</Accordion>
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ import eslint from '@antfu/eslint-config'

export default eslint({
formatters: true,
markdown: true,
})
Loading