8000 Update COffcanvas.tsx · engrrio07/coreui-react-17@b4792cc · GitHub
[go: up one dir, main page]

Skip to content

Commit b4792cc

Browse files
authored
Update COffcanvas.tsx
1 parent 078030b commit b4792cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface COffcanvasProps extends HTMLAttributes<HTMLDivElement> {
1111
/**
1212
* Apply a backdrop on body while offcanvas is open.
1313
*/
14-
backdrop?: boolean | string
14+
backdrop?: boolean | 'static'
1515
/**
1616
* A string of all className you want applied to the base component.
1717
*/
@@ -105,6 +105,7 @@ export const COffcanvas = forwardRef<HTMLDivElement, COffcanvasProps>(
105105
const handleDismiss = () => {
106106
setVisible(false)
107107
}
108+
108109
const handleBackdropDismiss = () => {
109110
if (backdrop !== 'static') {
110111
setVisible(false)
@@ -177,7 +178,7 @@ export const COffcanvas = forwardRef<HTMLDivElement, COffcanvasProps>(
177178
)
178179

179180
COffcanvas.propTypes = {
180-
backdrop: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
181+
backdrop: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf<'static'>(['static'])]),
181182
children: PropTypes.node,
182183
className: PropTypes.string,
183184
keyboard: PropTypes.bool,

0 commit comments

Comments
 (0)
0