8000 refactor(CToaster): remove utility class from component · 8proCode/coreui-react@e68605e · GitHub
[go: up one dir, main page]

Skip to content

Commit e68605e

Browse files
committed
refactor(CToaster): remove utility class from component
1 parent 59f25ff commit e68605e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/coreui-react/src/components/toast/CToaster.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const CToaster = forwardRef<HTMLDivElement, CToasterProps>(
5757
{toasts.length > 0 || children ? (
5858
<div
5959
className={classNames(
60-
'toaster toast-container p-3',
60+
'toaster toast-container',
6161
{
6262
'position-fixed': placement,
6363
'top-0': placement && placement.includes('top'),

packages/docs/content/components/toast.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const BasicExample = () => {
8282
return (
8383
<>
8484
<CButton onClick={() => addToast(exampleToast)}>Send a toast</CButton>
85-
<CToaster ref={toaster} push={toast} placement="top-end" />
85+
<CToaster className="p-3" placement="top-end" push={toast} ref={toaster} />
8686
</>
8787
)
8888
}
@@ -117,7 +117,7 @@ const exampleToast = (
117117
return (
118118
<>
119119
<CButton onClick={() => addToast(exampleToast)}>Send a toast</CButton>
120-
<CToaster ref={toaster} push={toast} placement="top-end" />
120+
<CToaster className="p-3" placement="top-end" push={toast} ref={toaster} />
121121
</>
122122
)
123123
```
@@ -152,7 +152,7 @@ Toasts are slightly translucent to blend in with what's below them.
152152
You can stack toasts by wrapping them in a toast container, which will vertically add some spacing.
153153

154154
```jsx preview
155-
<CToaster>
155+
<CToaster className="position-static">
156156
<CToast autohide={false} visible={true}>
157157
<CToastHeader closeButton>
158158
<svg

0 commit comments

Comments
 (0)
0