Skip to content

Commit

Permalink
docs: update API documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mrholek committed Oct 2, 2021
1 parent 057c550 commit 2b26dce
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 8 deletions.
2 changes: 2 additions & 0 deletions docs/4.0/api/CAccordionCollapse.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ import CAccordionCollapse from '@coreui/react/src/components/accordion/CAccordio
| Property | Description | Type | Default |
| --- | --- | --- | --- |
| **className** | A string of all className you want applied to the base component. | `string` | - |
| **onHide** | Callback fired when the component requests to be hidden. | `() => void` | - |
| **onShow** | Callback fired when the component requests to be shown. | `() => void` | - |
| **visible** | Toggle the visibility of component. | `boolean` | - |
3 changes: 1 addition & 2 deletions docs/4.0/api/CAlert.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import CAlert from '@coreui/react/src/components/alert/CAlert'
| **className** | A string of all className you want applied to the component. | `string` | - |
| **color** | Sets the color context of the component to one of CoreUI’s themed colors. | `'primary'` \| `'secondary'` \| `'success'` \| `'danger'` \| `'warning'` \| `'info'` \| `'dark'` \| `'light'` \| `string` | primary |
| **dismissible** | Optionally add a close button to alert and allow it to self dismiss. | `boolean` | - |
| **onDismiss** | Method called before the dissmiss animation has started. | `() => void` | - |
| **onDismissed** | Method called after the dissmiss animation has completed and the component is removed from the dom. | `() => void` | - |
| **onClose** | Callback fired when the component requests to be closed. | `() => void` | - |
| **variant** | Set the alert variant to a solid. | `string` | - |
| **visible** | Toggle the visibility of component. | `boolean` | true |
6 changes: 3 additions & 3 deletions docs/4.0/api/CCarousel.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import CCarousel from '@coreui/react/src/components/carousel/CCarousel'

| Property | Description | Type | Default |
| --- | --- | --- | --- |
| **animate** | Set 'animate' variable for created context. | `boolean` | true |
| **activeIndex** | index of the active item. | `number` | 0 |
| **className** | A string of all className you want applied to the base component. | `string` | - |
| **controls** | Adding in the previous and next controls. | `boolean` | - |
| **dark** | Add darker controls, indicators, and captions. | `boolean` | - |
| **index** | index of the active item. | `number` | 0 |
| **indicators** | Adding indicators at the bottom of the carousel for each item. | `boolean` | - |
| **interval** | The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle. | `number` \| `boolean` | 5000 |
| **onSlideChange** | On slide change callback. | `(a: string` \| `number) => void` | - |
| **onSlid** | Callback fired when a slide transition end. | `(active: number, direction: string) => void` | - |
| **onSlide** | Callback fired when a slide transition starts. | `(active: number, direction: string) => void` | - |
| **pause** | If set to 'hover', pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave. If set to false, hovering over the carousel won't pause it. | `boolean` \| `'hover'` | hover |
| **transition** | Set type of the transition. | `'slide'` \| `'crossfade'` | - |
| **wrap** | Set whether the carousel should cycle continuously or have hard stops. | `boolean` | true |
2 changes: 2 additions & 0 deletions docs/4.0/api/CCollapse.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ import CCollapse from '@coreui/react/src/components/collapse/CCollapse'
| Property | Description | Type | Default |
| --- | --- | --- | --- |
| **className** | A string of all className you want applied to the base component. | `string` | - |
| **onHide** | Callback fired when the component requests to be hidden. | `() => void` | - |
| **onShow** | Callback fired when the component requests to be shown. | `() => void` | - |
| **visible** | Toggle the visibility of component. | `boolean` | - |
2 changes: 2 additions & 0 deletions docs/4.0/api/CDropdown.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import CDropdown from '@coreui/react/src/components/dropdown/CDropdown'
| **component** | Component used for the root node. Either a string to use a HTML element or a component. | `string` \| `ComponentClass<any, any>` \| `FunctionComponent<any>` | div |
| **dark** | Sets a darker color scheme to match a dark navbar. | `boolean` | - |
| **direction** | Sets a specified direction and location of the dropdown menu. | `'dropup'` \| `'dropend'` \| `'dropstart'` | - |
| **onHide** | Callback fired when the component requests to be hidden. | `() => void` | - |
| **onShow** | Callback fired when the component requests to be shown. | `() => void` | - |
| **placement** | Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property. | `'auto'` \| `'top-end'` \| `'top'` \| `'top-start'` \| `'bottom-end'` \| `'bottom'` \| `'bottom-start'` \| `'right-start'` \| `'right'` \| `'right-end'` \| `'left-start'` \| `'left'` \| `'left-end'` | bottom-start |
| **popper** | If you want to disable dynamic positioning set this property to `true`. | `boolean` | true |
| **variant** | Set the dropdown variant to an btn-group, dropdown, input-group, and nav-item. | `'btn-group'` \| `'dropdown'` \| `'input-group'` \| `'nav-item'` | btn-group |
Expand Down
4 changes: 3 additions & 1 deletion docs/4.0/api/CModal.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import CModal from '@coreui/react/src/components/modal/CModal'
| **className** | A string of all className you want applied to the base component. | `string` | - |
| **fullscreen** | Set modal to covers the entire user viewport. | `boolean` \| `'sm'` \| `'md'` \| `'lg'` \| `'xl'` \| `'xxl'` | - |
| **keyboard** | Closes the modal when escape key is pressed. | `boolean` | true |
| **onDismiss** | Method called before the dissmiss animation has started. | `() => void` | - |
| **onClose** | Callback fired when the component requests to be closed. | `() => void` | - |
| **onClosePrevented** | Callback fired when the component requests to be closed. | `() => void` | - |
| **onShow** | Callback fired when the modal is shown, its backdrop is static and a click outside the modal or an escape key press is performed with the keyboard option set to false. | `() => void` | - |
| **portal** | Generates modal using createPortal. | `boolean` | true |
| **scrollable** | Create a scrollable modal that allows scrolling the modal body. | `boolean` | - |
| **size** | Size the component small, large, or extra large. | `'sm'` \| `'lg'` \| `'xl'` | - |
Expand Down
3 changes: 2 additions & 1 deletion docs/4.0/api/COffcanvas.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import COffcanvas from '@coreui/react/src/components/offcanvas/COffcanvas'
| **backdrop** | Apply a backdrop on body while offcanvas is open. | `boolean` | true |
| **className** | A string of all className you want applied to the base component. | `string` | - |
| **keyboard** | Closes the offcanvas when escape key is pressed | `boolean` | true |
| **onDismiss** | Method called before the dissmiss animation has started. | `() => void` | - |
| **onHide** | Callback fired when the component requests to be hidden. | `() => void` | - |
| **onShow** | Callback fired when the component requests to be shown. | `() => void` | - |
| **placement** | Components placement, there’s no default placement. | `'start'` \| `'end'` \| `'top'` \| `'bottom'` | - |
| **portal** | Generates modal using createPortal. | `boolean` | true |
| **scroll** | Allow body scrolling while offcanvas is open | `boolean` | false |
Expand Down
2 changes: 2 additions & 0 deletions docs/4.0/api/CPopover.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import CPopover from '@coreui/react/src/components/popover/CPopover'
| --- | --- | --- | --- |
| **content** | Content node for your component. | `ReactNode` | - |
| **offset** | Offset of the popover relative to its target. | `[number, number]` | [0, 8] |
| **onHide** | Callback fired when the component requests to be hidden. | `() => void` | - |
| **onShow** | Callback fired when the component requests to be shown. | `() => void` | - |
| **placement** | Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property. | `'top'` \| `'right'` \| `'bottom'` \| `'left'` | top |
| **title** | Title node for your component. | `ReactNode` | - |
| **trigger** | Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them. | `'hover'` \| `'focus'` \| `'click'` | click |
Expand Down
2 changes: 2 additions & 0 deletions docs/4.0/api/CPopoverContent.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import CPopoverContent from '@coreui/react/src/components/popover/CPopoverConten
| **hasPopperEscaped** | - | `boolean` | - |
| **isReferenceHidden** | - | `boolean` | - |
| **offset** | Offset of the popover relative to its target. | `[number, number]` | - |
| **onHide** | Callback fired when the component requests to be hidden. | `() => void` | - |
| **onShow** | Callback fired when the component requests to be shown. | `() => void` | - |
| **placement** | - | `Placement` | - |
| **placementClassNamePostfix** | - | `string` | - |
| **style** | - | `CSSProperties` | - |
Expand Down
2 changes: 2 additions & 0 deletions docs/4.0/api/CSidebar.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import CSidebar from '@coreui/react/src/components/sidebar/CSidebar'
| --- | --- | --- | --- |
| **className** | A string of all className you want applied to the component. | `string` | - |
| **narrow** | Make sidebar narrow. | `boolean` | - |
| **onHide** | Callback fired when the component requests to be hidden. | `() => void` | - |
| **onShow** | Callback fired when the component requests to be shown. | `() => void` | - |
| **onVisibleChange** | Event emitted after visibility of component changed. | `(visible: boolean) => void` | - |
| **overlaid** | Set sidebar to overlaid variant. | `boolean` | - |
| **position** | Place sidebar in non-static positions. | `'fixed'` \| `'sticky'` | - |
Expand Down
2 changes: 2 additions & 0 deletions docs/4.0/api/CTabPane.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ import CTabPane from '@coreui/react/src/components/tabs/CTabPane'
| Property | Description | Type | Default |
| --- | --- | --- | --- |
| **className** | A string of all className you want applied to the base component. | `string` | - |
| **onHide** | Callback fired when the component requests to be hidden. | `() => void` | - |
| **onShow** | Callback fired when the component requests to be shown. | `() => void` | - |
| **visible** | Toggle the visibility of component. | `boolean` | - |
3 changes: 2 additions & 1 deletion docs/4.0/api/CToast.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ import CToast from '@coreui/react/src/components/toast/CToast'
| **className** | A string of all className you want applied to the base component. | `string` | - |
| **color** | Sets the color context of the component to one of CoreUI’s themed colors. | `'primary'` \| `'secondary'` \| `'success'` \| `'danger'` \| `'warning'` \| `'info'` \| `'dark'` \| `'light'` \| `string` | - |
| **delay** | Delay hiding the toast (ms). | `number` | 5000 |
| **onDismiss** | Method called before the dissmiss animation has started. | `(index: number) => void` | - |
| **onClose** | Callback fired when the component requests to be closed. | `(index: number) => void` | - |
| **onShow** | Callback fired when the component requests to be shown. | `(index: number) => void` | - |
| **visible** | Toggle the visibility of component. | `boolean` | false |
2 changes: 2 additions & 0 deletions docs/4.0/api/CTooltip.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import CTooltip from '@coreui/react/src/components/tooltip/CTooltip'
| Property | Description | Type | Default |
| --- | --- | --- | --- |
| **content** | Content node for your component. | `ReactNode` | - |
| **onHide** | Callback fired when the component requests to be hidden. | `() => void` | - |
| **onShow** | Callback fired when the component requests to be shown. | `() => void` | - |
| **placement** | Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property. | `'top'` \| `'right'` \| `'bottom'` \| `'left'` | top |
| **trigger** | Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them. | `'hover'` \| `'focus'` \| `'click'` | hover |
| **visible** | Toggle the visibility of popover component. | `boolean` | - |
2 changes: 2 additions & 0 deletions docs/4.0/api/CTooltipContent.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import CTooltipContent from '@coreui/react/src/components/tooltip/CTooltipConten
| **forceUpdate** | - | `() => Partial<State>` | - |
| **hasPopperEscaped** | - | `boolean` | - |
| **isReferenceHidden** | - | `boolean` | - |
| **onHide** | Callback fired when the component requests to be hidden. | `() => void` | - |
| **onShow** | Callback fired when the component requests to be shown. | `() => void` | - |
| **placement** | - | `Placement` | - |
| **placementClassNamePostfix** | - | `string` | - |
| **style** | - | `CSSProperties` | - |
Expand Down

0 comments on commit 2b26dce

Please sign in to comment.