Skip to content

Commit 42bddde

Browse files
committed
docs: update API documentation
1 parent 11d3401 commit 42bddde

File tree

15 files changed

+38
-44
lines changed

15 files changed

+38
-44
lines changed

packages/coreui-react-chartjs/src/CChart.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ export interface CChartProps extends HTMLAttributes<HTMLCanvasElement | HTMLDivE
4343
data: ChartData | ((canvas: HTMLCanvasElement) => ChartData)
4444
/**
4545
* A fallback for when the canvas cannot be rendered. Can be used for accessible chart descriptions.
46-
*
47-
* {@link https://www.chartjs.org/docs/latest/general/accessibility.html More Info}
4846
*/
4947
fallbackContent?: React.ReactNode
5048
/**
@@ -80,14 +78,10 @@ export interface CChartProps extends HTMLAttributes<HTMLCanvasElement | HTMLDivE
8078
id?: string
8179
/**
8280
* The options object that is passed into the Chart.js chart.
83-
*
84-
* {@link https://www.chartjs.org/docs/latest/general/options.html More Info}
8581
*/
8682
options?: ChartOptions
8783
/**
8884
* The plugins array that is passed into the Chart.js chart (more info)
89-
*
90-
* {@link https://www.chartjs.org/docs/latest/developers/plugins.html More Info}
9185
*/
9286
plugins?: Plugin[]
9387
/**

packages/coreui-react/src/components/form/CFormInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export interface CFormInputProps
2626
*/
2727
onChange?: ChangeEventHandler<HTMLInputElement>
2828
/**
29-
* Render the component styled as plain text. Removes the default form field styling and preserve the correct margin and padding. Recommend to use only along side `readonly` [docs]
29+
* Render the component styled as plain text. Removes the default form field styling and preserve the correct margin and padding. Recommend to use only along side `readonly`.
3030
*/
3131
plainText?: boolean
3232
/**

packages/coreui-react/src/components/form/CFormSwitch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface CFormSwitchProps extends Omit<InputHTMLAttributes<HTMLInputElem
2222
*/
2323
label?: string | ReactNode
2424
/**
25-
* Size the component large or extra large. Works only with `switch` [docs]
25+
* Size the component large or extra large. Works only with `switch`.
2626
*/
2727
size?: 'lg' | 'xl'
2828
/**

packages/coreui-react/src/components/nav/CNavGroup.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ import { CNavContext } from '../sidebar/CSidebarNav'
1515
export interface CNavGroupProps {
1616
children?: ReactNode
1717
/**
18-
* A string of all className you want applied to the component. [docs]
18+
* A string of all className you want applied to the component.
1919
*/
2020
className?: string
2121
/**
22-
* Make nav group more compact by cutting all `padding` in half. [docs]
22+
* Make nav group more compact by cutting all `padding` in half.
2323
*/
2424
compact?: boolean
2525
/**
26-
* Set group toggler label. [docs]
26+
* Set group toggler label.
2727
*/
2828
toggler?: string | ReactNode
2929
/**
30-
* Show nav group items. [docs]
30+
* Show nav group items.
3131
*/
3232
visible?: boolean
3333
/**

packages/coreui-react/src/components/offcanvas/COffcanvas.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface COffcanvasProps extends HTMLAttributes<HTMLDivElement> {
1717
*/
1818
className?: string
1919
/**
20-
* Closes the offcanvas when escape key is pressed [docs]
20+
* Closes the offcanvas when escape key is pressed.
2121
*/
2222
keyboard?: boolean
2323
/**

packages/coreui-react/src/components/table/CTable.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export interface CTableProps extends Omit<TableHTMLAttributes<HTMLTableElement>,
5353
* Object: item is object with following keys available as column configuration:
5454
* - key (required)(String) - define column name equal to item key.
5555
* - label (String) - define visible label of column. If not defined, label will be generated automatically based on column name, by converting kebab-case and snake_case to individual words and capitalization of each word.
56-
* - _props (Object) - adds classes to all cels in column, ex. _props: { scope: 'col', className: 'custom-class' },
56+
* - _props (Object) - adds classes to all cels in column, ex. `_props: { scope: 'col', className: 'custom-class' }`,
5757
* - _style (Object) - adds styles to the column header (useful for defining widths)
5858
*
5959
* @since 4.3.0
@@ -69,9 +69,9 @@ export interface CTableProps extends Omit<TableHTMLAttributes<HTMLTableElement>,
6969
* Array of objects or strings, where each element represents one cell in the table footer.
7070
*
7171
* Example items:
72-
* ['FooterCell', 'FooterCell', 'FooterCell']
72+
* `['FooterCell', 'FooterCell', 'FooterCell']`
7373
* or
74-
* [{ label: 'FooterCell', _props: { color: 'success' }, ...]
74+
* `[{ label: 'FooterCell', _props: { color: 'success' }, ...]`
7575
*
7676
* @since 4.3.0
7777
*/
@@ -84,7 +84,7 @@ export interface CTableProps extends Omit<TableHTMLAttributes<HTMLTableElement>,
8484
* Array of objects, where each object represents one item - row in table. Additionally, you can add style classes to each row by passing them by '_props' key and to single cell by '_cellProps'.
8585
*
8686
* Example item:
87-
* { name: 'John' , age: 12, _props: { color: 'success' }, _cellProps: { age: { className: 'fw-bold'}}}
87+
* `{ name: 'John' , age: 12, _props: { color: 'success' }, _cellProps: { age: { className: 'fw-bold'}}}`
8888
*
8989
* @since 4.3.0
9090
*/

packages/docs/content/api/CChart.api.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ import CChart from '@coreui/react-chartjs/src/CChart'
1010
| **className** | A string of all className you want applied to the base component. | `string` | - |
1111
| **customTooltips** | Enables custom html based tooltips instead of standard tooltips. | `boolean` | true |
1212
| **data** | The data object that is passed into the Chart.js chart (more info). | `ChartData<keyof ChartTypeRegistry, (number` \| `ScatterDataPoint` \| `BubbleDataPoint)[], unknown>` \| `((canvas: HTMLCanvasElement) => ChartData<...>)` | - |
13-
| **fallbackContent** | A fallback for when the canvas cannot be rendered. Can be used for accessible chart descriptions.<br/><br/>{@link https://www.chartjs.org/docs/latest/general/accessibility.html More Info} | `React.ReactNode` | - |
13+
| **fallbackContent** | A fallback for when the canvas cannot be rendered. Can be used for accessible chart descriptions. | `React.ReactNode` | - |
1414
| **getDatasetAtEvent** | Proxy for Chart.js getDatasetAtEvent. Calls with dataset and triggering event. | `(dataset: InteractionItem[], event: React.MouseEvent<HTMLCanvasElement>) => void` | - |
1515
| **getElementAtEvent** | Proxy for Chart.js getElementAtEvent. Calls with single element array and triggering event. | `(element: InteractionItem[], event: React.MouseEvent<HTMLCanvasElement>) => void` | - |
1616
| **getElementsAtEvent** | Proxy for Chart.js getElementsAtEvent. Calls with element array and triggering event. | `(elements: InteractionItem[], event: React.MouseEvent<HTMLCanvasElement>) => void` | - |
1717
| **height** | Height attribute applied to the rendered canvas. | `number` | 150 |
1818
| **id** | ID attribute applied to the rendered canvas. | `string` | - |
19-
| **options** | The options object that is passed into the Chart.js chart.<br/><br/>{@link https://www.chartjs.org/docs/latest/general/options.html More Info} | `_DeepPartialObject<CoreChartOptions<keyof ChartTypeRegistry> & ElementChartOptions<keyof ChartTypeRegistry> & PluginChartOptions<...> & DatasetChartOptions<...> & ScaleChartOptions<...>>` | - |
20-
| **plugins** | The plugins array that is passed into the Chart.js chart (more info)<br/><br/>{@link https://www.chartjs.org/docs/latest/developers/plugins.html More Info} | `Plugin<keyof ChartTypeRegistry, AnyObject>[]` | [] |
19+
| **options** | The options object that is passed into the Chart.js chart. | `_DeepPartialObject<CoreChartOptions<keyof ChartTypeRegistry> & ElementChartOptions<keyof ChartTypeRegistry> & PluginChartOptions<...> & DatasetChartOptions<...> & ScaleChartOptions<...>>` | - |
20+
| **plugins** | The plugins array that is passed into the Chart.js chart (more info) | `Plugin<keyof ChartTypeRegistry, AnyObject>[]` | [] |
2121
| **redraw** | If true, will tear down and redraw chart on all updates. | `boolean` | false |
2222
| **type** | Chart.js chart type. | `{'line'` \| `'bar'` \| `'radar'` \| `'doughnut'` \| `'polarArea'` \| `'bubble'` \| `'pie'` \| `'scatter'}` | bar |
2323
| **width** | Width attribute applied to the rendered canvas. | `number` | 300 |

packages/docs/content/api/CCharts.api.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ import CChartBar from '@coreui/react-chartjs/src/CCharts'
1010
| **className** | A string of all className you want applied to the base component. | `string` | - |
1111
| **customTooltips** | Enables custom html based tooltips instead of standard tooltips. | `boolean` | true |
1212
| **data** | The data object that is passed into the Chart.js chart (more info). | `ChartData<keyof ChartTypeRegistry, (number` \| `ScatterDataPoint` \| `BubbleDataPoint)[], unknown>` \| `((canvas: HTMLCanvasElement) => ChartData<...>)` | - |
13-
| **fallbackContent** | A fallback for when the canvas cannot be rendered. Can be used for accessible chart descriptions.<br/><br/>{@link https://www.chartjs.org/docs/latest/general/accessibility.html More Info} | `React.ReactNode` | - |
13+
| **fallbackContent** | A fallback for when the canvas cannot be rendered. Can be used for accessible chart descriptions. | `React.ReactNode` | - |
1414
| **getDatasetAtEvent** | Proxy for Chart.js getDatasetAtEvent. Calls with dataset and triggering event. | `(dataset: InteractionItem[], event: React.MouseEvent<HTMLCanvasElement>) => void` | - |
1515
| **getElementAtEvent** | Proxy for Chart.js getElementAtEvent. Calls with single element array and triggering event. | `(element: InteractionItem[], event: React.MouseEvent<HTMLCanvasElement>) => void` | - |
1616
| **getElementsAtEvent** | Proxy for Chart.js getElementsAtEvent. Calls with element array and triggering event. | `(elements: InteractionItem[], event: React.MouseEvent<HTMLCanvasElement>) => void` | - |
1717
| **height** | Height attribute applied to the rendered canvas. | `number` | 150 |
1818
| **id** | ID attribute applied to the rendered canvas. | `string` | - |
19-
| **options** | The options object that is passed into the Chart.js chart.<br/><br/>{@link https://www.chartjs.org/docs/latest/general/options.html More Info} | `_DeepPartialObject<CoreChartOptions<keyof ChartTypeRegistry> & ElementChartOptions<keyof ChartTypeRegistry> & PluginChartOptions<...> & DatasetChartOptions<...> & ScaleChartOptions<...>>` | - |
20-
| **plugins** | The plugins array that is passed into the Chart.js chart (more info)<br/><br/>{@link https://www.chartjs.org/docs/latest/developers/plugins.html More Info} | `Plugin<keyof ChartTypeRegistry, AnyObject>[]` | - |
19+
| **options** | The options object that is passed into the Chart.js chart. | `_DeepPartialObject<CoreChartOptions<keyof ChartTypeRegistry> & ElementChartOptions<keyof ChartTypeRegistry> & PluginChartOptions<...> & DatasetChartOptions<...> & ScaleChartOptions<...>>` | - |
20+
| **plugins** | The plugins array that is passed into the Chart.js chart (more info) | `Plugin<keyof ChartTypeRegistry, AnyObject>[]` | - |
2121
| **redraw** | If true, will tear down and redraw chart on all updates. | `boolean` | false |
2222
| **width** | Width attribute applied to the rendered canvas. | `number` | 300 |
2323
| **wrapper** | Put the chart into the wrapper div element. | `boolean` | true |

packages/docs/content/api/CCol.api.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import CCol from '@coreui/react/src/components/grid/CCol'
88
| Property | Description | Type | Default |
99
| --- | --- | --- | --- |
1010
| **className** | A string of all className you want applied to the base component. | `string` | - |
11-
| **lg** | The number of columns/offset/order on large devices (<1200px). | `{ 'auto'` \| `number` \| `string` \| `boolean` \| `{ span: 'auto'` \| `number` \| `string` \| `boolean }` \| `{ offset: number` \| `string }` \| `{ order: 'first'` \| `'last'` \| `number` \| `string }}` | - |
12-
| **md** | The number of columns/offset/order on medium devices (<992px). | `{ 'auto'` \| `number` \| `string` \| `boolean` \| `{ span: 'auto'` \| `number` \| `string` \| `boolean }` \| `{ offset: number` \| `string }` \| `{ order: 'first'` \| `'last'` \| `number` \| `string }}` | - |
13-
| **sm** | The number of columns/offset/order on small devices (<768px). | `{ 'auto'` \| `number` \| `string` \| `boolean` \| `{ span: 'auto'` \| `number` \| `string` \| `boolean }` \| `{ offset: number` \| `string }` \| `{ order: 'first'` \| `'last'` \| `number` \| `string }}` | - |
14-
| **xl** | The number of columns/offset/order on X-Large devices (<1400px). | `{ 'auto'` \| `number` \| `string` \| `boolean` \| `{ span: 'auto'` \| `number` \| `string` \| `boolean }` \| `{ offset: number` \| `string }` \| `{ order: 'first'` \| `'last'` \| `number` \| `string }}` | - |
15-
| **xs** | The number of columns/offset/order on extra small devices (<576px). | `{ 'auto'` \| `number` \| `string` \| `boolean` \| `{ span: 'auto'` \| `number` \| `string` \| `boolean }` \| `{ offset: number` \| `string }` \| `{ order: 'first'` \| `'last'` \| `number` \| `string }}` | - |
11+
| **lg** | The number of columns/offset/order on large devices (\<1200px). | `{ 'auto'` \| `number` \| `string` \| `boolean` \| `{ span: 'auto'` \| `number` \| `string` \| `boolean }` \| `{ offset: number` \| `string }` \| `{ order: 'first'` \| `'last'` \| `number` \| `string }}` | - |
12+
| **md** | The number of columns/offset/order on medium devices (\<992px). | `{ 'auto'` \| `number` \| `string` \| `boolean` \| `{ span: 'auto'` \| `number` \| `string` \| `boolean }` \| `{ offset: number` \| `string }` \| `{ order: 'first'` \| `'last'` \| `number` \| `string }}` | - |
13+
| **sm** | The number of columns/offset/order on small devices (\<768px). | `{ 'auto'` \| `number` \| `string` \| `boolean` \| `{ span: 'auto'` \| `number` \| `string` \| `boolean }` \| `{ offset: number` \| `string }` \| `{ order: 'first'` \| `'last'` \| `number` \| `string }}` | - |
14+
| **xl** | The number of columns/offset/order on X-Large devices (\<1400px). | `{ 'auto'` \| `number` \| `string` \| `boolean` \| `{ span: 'auto'` \| `number` \| `string` \| `boolean }` \| `{ offset: number` \| `string }` \| `{ order: 'first'` \| `'last'` \| `number` \| `string }}` | - |
15+
| **xs** | The number of columns/offset/order on extra small devices (\<576px). | `{ 'auto'` \| `number` \| `string` \| `boolean` \| `{ span: 'auto'` \| `number` \| `string` \| `boolean }` \| `{ offset: number` \| `string }` \| `{ order: 'first'` \| `'last'` \| `number` \| `string }}` | - |
1616
| **xxl** | The number of columns/offset/order on XX-Large devices (≥1400px). | `{ 'auto'` \| `number` \| `string` \| `boolean` \| `{ span: 'auto'` \| `number` \| `string` \| `boolean }` \| `{ offset: number` \| `string }` \| `{ order: 'first'` \| `'last'` \| `number` \| `string }}` | - |

packages/docs/content/api/CFormInput.api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import CFormInput from '@coreui/react/src/components/form/CFormInput'
1818
| **invalid** | Set component validation state to invalid. | `boolean` | - |
1919
| **label** **_4.2.0+_** | Add a caption for a component. | `ReactNode` | - |
2020
| **onChange** | Method called immediately after the `value` prop changes. | `ChangeEventHandler<HTMLInputElement>` | - |
21-
| **plainText** | Render the component styled as plain text. Removes the default form field styling and preserve the correct margin and padding. Recommend to use only along side `readonly` | `boolean` | - |
21+
| **plainText** | Render the component styled as plain text. Removes the default form field styling and preserve the correct margin and padding. Recommend to use only along side `readonly`. | `boolean` | - |
2222
| **readOnly** | Toggle the readonly state for the component. | `boolean` | - |
2323
| **size** | Size the component small or large. | `'sm'` \| `'lg'` | - |
2424
| **text** **_4.2.0+_** | Add helper text to the component. | `ReactNode` | - |

packages/docs/content/api/CFormSwitch.api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ import CFormSwitch from '@coreui/react/src/components/form/CFormSwitch'
1111
| **id** | The id global attribute defines an identifier (ID) that must be unique in the whole document. | `string` | - |
1212
| **invalid** | Set component validation state to invalid. | `boolean` | - |
1313
| **label** | The element represents a caption for a component. | `ReactNode` | - |
14-
| **size** | Size the component large or extra large. Works only with `switch` | `'lg'` \| `'xl'` | - |
14+
| **size** | Size the component large or extra large. Works only with `switch`. | `'lg'` \| `'xl'` | - |
1515
| **type** | Specifies the type of component. | `'checkbox'` \| `'radio'` | checkbox |
1616
| **valid** | Set component validation state to valid. | `boolean` | - |

packages/docs/content/api/COffcanvas.api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import COffcanvas from '@coreui/react/src/components/offcanvas/COffcanvas'
99
| --- | --- | --- | --- |
1010
| **backdrop** | Apply a backdrop on body while offcanvas is open. | `boolean` | true |
1111
| **className** | A string of all className you want applied to the base component. | `string` | - |
12-
| **keyboard** | Closes the offcanvas when escape key is pressed | `boolean` | true |
12+
| **keyboard** | Closes the offcanvas when escape key is pressed. | `boolean` | true |
1313
| **onHide** | Callback fired when the component requests to be hidden. | `() => void` | - |
1414
| **onShow** | Callback fired when the component requests to be shown. | `() => void` | - |
1515
| **placement** | Components placement, there’s no default placement. | `'start'` \| `'end'` \| `'top'` \| `'bottom'` | - |

packages/docs/content/api/CPlaceholder.api.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import CPlaceholder from '@coreui/react/src/components/placeholder/CPlaceholder'
1111
| **className** | A string of all className you want applied to the component. | `string` | - |
1212
| **color** | Sets the color context of the component to one of CoreUI’s themed colors. | `'primary'` \| `'secondary'` \| `'success'` \| `'danger'` \| `'warning'` \| `'info'` \| `'dark'` \| `'light'` \| `string` | - |
1313
| **component** | Component used for the root node. Either a string to use a HTML element or a component. | `string` \| `ComponentClass<any, any>` \| `FunctionComponent<any>` | - |
14-
| **lg** | The number of columns on large devices (<1200px). | `number` | - |
15-
| **md** | The number of columns on medium devices (<992px). | `number` | - |
14+
| **lg** | The number of columns on large devices (\<1200px). | `number` | - |
15+
| **md** | The number of columns on medium devices (\<992px). | `number` | - |
1616
| **size** | Size the component extra small, small, or large. | `'xs'` \| `'sm'` \| `'lg'` | - |
17-
| **sm** | The number of columns on small devices (<768px). | `number` | - |
18-
| **xl** | The number of columns on X-Large devices (<1400px). | `number` | - |
19-
| **xs** | The number of columns on extra small devices (<576px). | `number` | - |
17+
| **sm** | The number of columns on small devices (\<768px). | `number` | - |
18+
| **xl** | The number of columns on X-Large devices (\<1400px). | `number` | - |
19+
| **xs** | The number of columns on extra small devices (\<576px). | `number` | - |
2020
| **xxl** | The number of columns on XX-Large devices (≥1400px). | `number` | - |

0 commit comments

Comments
 (0)