From 6e60f08db14b0f7896c703f41fb6c4c2b7362fd6 Mon Sep 17 00:00:00 2001 From: Ben Jenkinson <59176+BenJenkinson@users.noreply.github.com> Date: Thu, 19 May 2022 11:14:37 +0100 Subject: [PATCH] fix(Offcanvas): make types match existing `direction` prop --- src/Offcanvas.js | 2 +- types/lib/Offcanvas.d.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Offcanvas.js b/src/Offcanvas.js index 6ad7abdf1..4413b9f29 100644 --- a/src/Offcanvas.js +++ b/src/Offcanvas.js @@ -29,7 +29,7 @@ const propTypes = { className: PropTypes.string, container: targetPropType, cssModule: PropTypes.object, - direction: PropTypes.oneOf(['start', 'end', 'bottom', 'top', 'left', 'right']), + direction: PropTypes.oneOf(['start', 'end', 'bottom', 'top']), fade: PropTypes.bool, innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func,]), isOpen: PropTypes.bool, diff --git a/types/lib/Offcanvas.d.ts b/types/lib/Offcanvas.d.ts index 2980e9081..6f5fb098b 100644 --- a/types/lib/Offcanvas.d.ts +++ b/types/lib/Offcanvas.d.ts @@ -2,7 +2,7 @@ import * as React from 'react'; import { CSSModule } from './utils'; import { FadeProps } from './Fade'; -export type Placement = 'start' | 'end' | 'left' | 'right' | 'bottom' | 'top'; +export type Direction = 'start' | 'end' | 'bottom' | 'top'; export interface OffcanvasProps extends React.HTMLAttributes { [key: string]: any; @@ -24,7 +24,7 @@ export interface OffcanvasProps extends React.HTMLAttributes { onEnter?: () => void; onExit?: () => void; onOpened?: () => void; - placement?: Placement; + direction?: Direction; returnFocusAfterClose?: boolean; scrollable?: boolean; toggle?: React.KeyboardEventHandler | React.MouseEventHandler;