Skip to content

Commit ab0f04c

Browse files
committed
tests: update snapshots
1 parent 222565d commit ab0f04c

File tree

9 files changed

+36
-7
lines changed

9 files changed

+36
-7
lines changed

packages/coreui-react/src/components/carousel/CCarousel.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export const CCarousel = forwardRef<HTMLDivElement, CCarouselProps>(
235235
<div className="carousel-inner">
236236
{Children.map(children, (child, index) => {
237237
if (React.isValidElement(child)) {
238-
return React.cloneElement(child, {
238+
return React.cloneElement(child as React.ReactElement<any>, {
239239
active: active === index ? true : false,
240240
direction: direction,
241241
key: index,

packages/coreui-react/src/components/dropdown/CDropdownToggle.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const CDropdownToggle: FC<CDropdownToggleProps> = ({
7575
const Toggler = (ref?: React.Ref<any>) => {
7676
return custom && React.isValidElement(children) ? (
7777
<>
78-
{React.cloneElement(children, {
78+
{React.cloneElement(children as React.ReactElement<any>, {
7979
'aria-expanded': visible,
8080
...(!rest.disabled && { ...triggers }),
8181
ref: useForkedRef(ref, dropdownToggleRef),

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ export const CNavGroup = forwardRef<HTMLLIElement, CNavGroupProps>(
124124
>
125125
{React.Children.map(children, (child, index) => {
126126
if (React.isValidElement(child)) {
127-
return React.cloneElement(child, { key: index, idx: `${idx}.${index}` })
127+
return React.cloneElement(child as React.ReactElement<any>, {
128+
key: index,
129+
idx: `${idx}.${index}`,
130+
})
128131
}
129132
return
130133
})}

packages/coreui-react/src/components/sidebar/CSidebarNav.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ export const CSidebarNav = forwardRef<HTMLUListElement, CSidebarNavProps>(
2929
<CNavContext.Provider value={CNavContextValues}>
3030
{React.Children.map(children, (child, index) => {
3131
if (React.isValidElement(child)) {
32-
return React.cloneElement(child, { key: index, idx: `${index}` })
32+
return React.cloneElement(child as React.ReactElement<any>, {
33+
key: index,
34+
idx: `${index}`,
35+
})
3336
}
3437
return
3538
})}

packages/coreui-react/src/components/toast/__tests__/__snapshots__/CToast.spec.tsx.snap

+13
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,19 @@ exports[`CToast customize 4`] = `
5353
`;
5454

5555
exports[`CToast customize 5`] = `
56+
<div>
57+
<div
58+
aria-atomic="true"
59+
aria-live="assertive"
60+
class="toast fade bg-warning border-0 bazinga showing"
61+
role="alert"
62+
>
63+
Test
64+
</div>
65+
</div>
66+
`;
67+
68+
exports[`CToast customize 6`] = `
5669
<div>
5770
<div
5871
aria-atomic="true"

packages/docs/content/4.3/api/CTable.api.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import CTable from '@coreui/react/src/components/table/CTable'
77

88
| Property | Description | Type | Default |
99
| --- | --- | --- | --- |
10-
| **align** | Set the vertical aligment. | `'bottom'` \| `'middle'` \| `'top'` | - |
10+
| **align** | Set the vertical aligment. | `string` | - |
1111
| **borderColor** | Sets the border color of the component to one of CoreUI’s themed colors. | `'primary'` \| `'secondary'` \| `'success'` \| `'danger'` \| `'warning'` \| `'info'` \| `'dark'` \| `'light'` \| `string` | - |
1212
| **bordered** | Add borders on all sides of the table and cells. | `boolean` | - |
1313
| **borderless** | Remove borders on all sides of the table and cells. | `boolean` | - |

packages/docs/content/4.3/api/CTableDataCell.api.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ import CTableDataCell from '@coreui/react/src/components/table/CTableDataCell'
88
| Property | Description | Type | Default |
99
| --- | --- | --- | --- |
1010
| **active** | Highlight a table row or cell. | `boolean` | - |
11-
| **align** | Set the vertical aligment. | `'bottom'` \| `'middle'` \| `'top'` | - |
11+
| **align** | Set the vertical aligment. | `string` | - |
1212
| **className** | A string of all className you want applied to the component. | `string` | - |
1313
| **color** | Sets the color context of the component to one of CoreUI’s themed colors. | `'primary'` \| `'secondary'` \| `'success'` \| `'danger'` \| `'warning'` \| `'info'` \| `'dark'` \| `'light'` \| `string` | - |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
```jsx
3+
import { CTableResponsiveWrapper } from '@coreui/react'
4+
// or
5+
import CTableResponsiveWrapper from '@coreui/react/src/components/table/CTableResponsiveWrapper'
6+
```
7+
8+
| Property | Description | Type | Default |
9+
| --- | --- | --- | --- |
10+
| **responsive** | Make any table responsive across all viewports or pick a maximum breakpoint with which to have a responsive table up to. | `boolean` \| `'sm'` \| `'md'` \| `'lg'` \| `'xl'` \| `'xxl'` | - |

packages/docs/content/4.3/api/CTableRow.api.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ import CTableRow from '@coreui/react/src/components/table/CTableRow'
88
| Property | Description | Type | Default |
99
| --- | --- | --- | --- |
1010
| **active** | Highlight a table row or cell.. | `boolean` | - |
11-
| **align** | Set the vertical aligment. | `'bottom'` \| `'middle'` \| `'top'` | - |
11+
| **align** | Set the vertical aligment. | `string` | - |
1212
| **className** | A string of all className you want applied to the component. | `string` | - |
1313
| **color** | Sets the color context of the component to one of CoreUI’s themed colors. | `'primary'` \| `'secondary'` \| `'success'` \| `'danger'` \| `'warning'` \| `'info'` \| `'dark'` \| `'light'` \| `string` | - |

0 commit comments

Comments
 (0)