-
-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from coreui/dev-vnext
docs: add stubs
- Loading branch information
Showing
18 changed files
with
247 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
### CoreUI `Aside` menu component | ||
|
||
| prop | default | | ||
| ------- | --------- | ||
| children | | ||
| className | `aside-menu` | ||
| display | `sm, md, lg, xl, ""` | ||
| fixed | `false` | ||
| hidden | `false` | ||
| isOpen | `false` | ||
| offCanvas | `true` | ||
| tag | `aside` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
### CoreUI `AsideToggler` component | ||
|
||
|
||
prop | default | ||
--- | --- | ||
children | `<span className="navbar-toggler-icon" />` | ||
className | `navbar-toggler` | ||
display | `lg` | ||
mobile | `false` | ||
tag | `button` | ||
type | `button` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### CoreUI `Breadcrumb` component | ||
|
||
_todo_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
### CoreUI `Footer` component | ||
|
||
prop | default | ||
--- | --- | ||
children | | ||
className | `app-footer` | ||
fixed | `false` | ||
tag | `footer` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
### CoreUI `Header` component | ||
|
||
prop | default | ||
--- | --- | ||
children | | ||
className | `app-header`, `navbar` | ||
fixed | `false` | ||
tag | `header` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### CoreUI `HeaderDropdown` component | ||
|
||
_todo_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
### CoreUI `NavbarBrand` component | ||
|
||
|
||
prop | default | ||
--- | --- | ||
tag | `a` | ||
children | `<img src width height alt className/>` | ||
className | `navbar-brand` | ||
brand | `{src, width, height, alt, className: 'navbar-brand' }` | ||
full | `{src, width, height, alt, className: 'navbar-brand-full' }` | ||
minimized | `{src, width, height, alt, className: 'navbar-brand-minimized' }` | ||
|
||
|
||
example: | ||
```js | ||
import { AppNavbarBrand } from '@coreui/react'; | ||
import logo from './logo.svg' | ||
import sygnet from './sygnet.svg' | ||
|
||
const full= { src: logo, width: 89, height: 25, alt: 'CoreUI Logo' } | ||
const minimized= { src: sygnet, width: 30, height: 30, alt: 'CoreUI Logo' } | ||
|
||
<AppNavbarBrand full={full} minimized={minimized} /> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
### [CoreUI for React](https://coreui.io/react) base components | ||
|
||
##### Layout components | ||
|
||
- [Aside](./Aside.md) | ||
- [AsideToggler](./AsideToggler.md) | ||
- [Breadcrumb](./Breadcrumb.md) | ||
- [Footer](./Footer.md) | ||
- [Header](./Header.md) | ||
- [HeaderDropdown](./HeaderDropdown.md) | ||
- [NavbarBrand](./NavbarBrand.md) | ||
- [Sidebar](./Sidebar.md) | ||
- [SidebarFooter](./SidebarFooter.md) | ||
- [SidebarForm](./SidebarForm.md) | ||
- [SidebarHeader](./SidebarHeader.md) | ||
- [SidebarMinimizer](./SidebarMinimizer.md) | ||
- [SidebarNav](./SidebarNav.md) | ||
- [SidebarToggler](./SidebarToggler.md) | ||
- [Switch](./Switch.md) | ||
|
||
|
||
##### Installation: | ||
`npm install @coreui/react` | ||
|
||
##### Import | ||
`import { AppAside } from '@coreui/react'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
### CoreUI `Sidebar` component | ||
|
||
|
||
prop | default | ||
--- | --- | ||
children | | ||
className | `sidebar` | ||
compact | `false` | ||
display | `sm, md, lg, xl, ""` | ||
fixed | `false` | ||
minimized | `false` | ||
isOpen | `false` | ||
offCanvas | `false` | ||
tag | `div` | ||
|
||
|
||
#### Supported content | ||
Sidebar come with built-in support for a handful of sub-components. | ||
|
||
- SidebarFooter | ||
- SidebarForm | ||
- SidebarHeader | ||
- [SidebarMinimizer](./SidebarMinimizer.md) | ||
- [SidebarNav](./SidebarNav.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### CoreUI `SidebarFooter` component | ||
|
||
_todo_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### CoreUI `SidebarForm` component | ||
|
||
_todo_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### CoreUI `SidebarHeader` component | ||
|
||
_todo_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
### CoreUI `SidebarMinimizer` component | ||
|
||
prop | default | ||
--- | --- | ||
children | | ||
className | `sidebar-minimizer mt-auto` | ||
tag | `button` | ||
type | `button` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
### CoreUI `SidebarNav` subcomponent | ||
|
||
|
||
prop | default | ||
--- | --- | ||
children | `this.navList(navConfig.items)` | ||
className | `sidebar-nav` | ||
navConfig | `{ items: [ { name url icon badge } ] }` | ||
isOpen | `false` | ||
tag | `nav` | ||
|
||
#### `navConfig` structure | ||
|
||
- title: | ||
````js | ||
{ | ||
title: true, | ||
name: 'Theme', | ||
class: '' // optional class names space delimited list for title item ex: "text-center" | ||
wrapper: { // optional wrapper object | ||
element: '', // optional* valid HTML5 element tag ( *required when passing attributes) | ||
attributes: {} // optional valid JS object with JS API naming ex: { className: "my-class", style: { fontFamily: "Verdana" }, id: "my-id"} | ||
}, | ||
}, | ||
```` | ||
- item: | ||
````js | ||
{ | ||
name: 'Dashboard', | ||
url: '/dashboard', | ||
icon: `icon-speedometer', | ||
class: '', // optional | ||
variant: 'success', // optional | ||
badge: { | ||
variant: 'info', | ||
text: 'NEW', | ||
class: '' // optional | ||
} | ||
}, | ||
```` | ||
- item with `children` array - works like `nav-dropdown-toggle` with `nav-dropdown-items` | ||
````js | ||
{ | ||
name: 'Icons', | ||
url: '/icons', | ||
icon: 'icon-star', | ||
children: [ | ||
{ | ||
name: 'Flags', // item options apply | ||
url: '/icons/flags', | ||
icon: 'icon-star', | ||
badge: { | ||
variant: 'success', | ||
text: 'NEW' | ||
} | ||
}, | ||
] | ||
} | ||
```` | ||
- divider: | ||
````js | ||
{ | ||
divider: true | ||
}, | ||
```` | ||
- order of precedence: | ||
```` | ||
title > divider > children > item | ||
```` | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
### CoreUI `SidebarToggler` component | ||
|
||
|
||
prop | default | ||
--- | --- | ||
children | ` <span className="navbar-toggler-icon" />` | ||
className | `navbar-toggler` | ||
display | `lg` | ||
mobile | `false` | ||
tag | `button` | ||
type | `button` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
### CoreUI `Switch` component | ||
|
||
prop | default | ||
--- | --- | ||
color | `secondary` | ||
label | `false` | ||
outline | `false` | ||
size | `'', 'lg', 'sm'` | ||
checked | `false` | ||
defaultChecked | `false` | ||
defaultValue | | ||
value | | ||
disabled | `false` | ||
form | | ||
name | | ||
required | `false` | ||
onChange | | ||
type | `checkbox` | ||
variant | `''` | ||
className | `switch` | ||
dataOn | `On` | ||
dataOff | `Off` |