Skip to content

Commit

Permalink
fix(Offcanvas): make types match existing direction prop
Browse files Browse the repository at this point in the history
  • Loading branch information
BenJenkinson authored and davidacevedo committed May 27, 2022
1 parent 5d3eedf commit 6e60f08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Offcanvas.js
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions types/lib/Offcanvas.d.ts
Expand Up @@ -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<HTMLElement> {
[key: string]: any;
Expand All @@ -24,7 +24,7 @@ export interface OffcanvasProps extends React.HTMLAttributes<HTMLElement> {
onEnter?: () => void;
onExit?: () => void;
onOpened?: () => void;
placement?: Placement;
direction?: Direction;
returnFocusAfterClose?: boolean;
scrollable?: boolean;
toggle?: React.KeyboardEventHandler<any> | React.MouseEventHandler<any>;
Expand Down

0 comments on commit 6e60f08

Please sign in to comment.