UNPKG

@coreui/react

Version:

UI Components Library for React.js

51 lines (50 loc) 1.45 kB
import React, { HTMLAttributes } from 'react'; export interface COffcanvasProps extends HTMLAttributes<HTMLDivElement> { /** * Apply a backdrop on body while offcanvas is open. */ backdrop?: boolean | 'static'; /** * A string of all className you want applied to the base component. */ className?: string; /** * Sets a darker color scheme. */ dark?: boolean; /** * Closes the offcanvas when escape key is pressed. */ keyboard?: boolean; /** * Callback fired when the component requests to be hidden. */ onHide?: () => void; /** * Callback fired when the component requests to be shown. */ onShow?: () => void; /** * Components placement, there’s no default placement. */ placement: 'start' | 'end' | 'top' | 'bottom'; /** * Generates modal using createPortal. */ portal?: boolean; /** * Responsive offcanvas property hide content outside the viewport from a specified breakpoint and down. * * @since 4.6.0 */ responsive?: boolean | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'; /** * Allow body scrolling while offcanvas is open */ scroll?: boolean; /** * Toggle the visibility of offcanvas component. */ visible?: boolean; } export declare const COffcanvas: React.ForwardRefExoticComponent<COffcanvasProps & React.RefAttributes<HTMLDivElement>>;