diff --git a/components/drawer/Drawer.d.ts b/components/drawer/Drawer.d.ts index 37cd30d1..6ae297e4 100644 --- a/components/drawer/Drawer.d.ts +++ b/components/drawer/Drawer.d.ts @@ -28,7 +28,7 @@ export interface DrawerTheme { wrapper?: string; } -export interface DrawerProps extends ReactToolbox.Props { +export interface DrawerCommonProps { /** * If true, the drawer will be visible. * @default false @@ -47,10 +47,6 @@ export interface DrawerProps extends ReactToolbox.Props { * Callback function to be invoked when the overlay is clicked. */ onOverlayClick?: Function; - /** - * Classnames object defining the component style. - */ - theme?: DrawerTheme; /** * Type of drawer. It can be left or right to display the drawer on the left or right side of the screen. * @default left @@ -63,6 +59,13 @@ export interface DrawerProps extends ReactToolbox.Props { withOverlay?: boolean; } +export interface DrawerProps extends ReactToolbox.Props, DrawerCommonProps { + /** + * Classnames object defining the component style. + */ + theme?: DrawerTheme; +} + export class Drawer extends React.Component { } export default Drawer; diff --git a/components/layout/Layout.d.ts b/components/layout/Layout.d.ts index 477b57b9..afc943e7 100644 --- a/components/layout/Layout.d.ts +++ b/components/layout/Layout.d.ts @@ -1,8 +1,5 @@ import * as React from "react"; import ReactToolbox from "../index"; -import { NavDrawer } from './NavDrawer'; -import { Panel } from './Panel'; -import { Sidebar } from './Sidebar'; export interface LayoutTheme { appbarFixed?: string; @@ -54,7 +51,7 @@ export interface LayoutProps extends ReactToolbox.Props { /** * Children to pass through the component. */ - children?: [NavDrawer | Panel | Sidebar]; + children?: JSX.Element | JSX.Element[]; /** * Classnames object defining the component style. */ diff --git a/components/layout/NavDrawer.d.ts b/components/layout/NavDrawer.d.ts index c6cb5650..16e78173 100644 --- a/components/layout/NavDrawer.d.ts +++ b/components/layout/NavDrawer.d.ts @@ -1,5 +1,5 @@ import * as React from "react"; -import { DrawerProps } from '../drawer/Drawer'; +import { DrawerCommonProps } from '../drawer/Drawer'; export interface NavDrawerTheme { /** @@ -12,7 +12,7 @@ export interface NavDrawerTheme { clipped?: string; } -export interface NavDrawerProps extends DrawerProps { +export interface NavDrawerProps extends DrawerCommonProps { /** * If true, the drawer will be shown as an overlay. * @default false diff --git a/components/layout/Sidebar.d.ts b/components/layout/Sidebar.d.ts index 56d2075c..e8c2a5b6 100644 --- a/components/layout/Sidebar.d.ts +++ b/components/layout/Sidebar.d.ts @@ -1,5 +1,5 @@ import * as React from "react"; -import { DrawerProps } from '../drawer/Drawer'; +import { DrawerCommonProps } from '../drawer/Drawer'; export interface SidebarTheme { /** @@ -12,7 +12,7 @@ export interface SidebarTheme { pinned?: string; } -export interface SidebarProps extends DrawerProps { +export interface SidebarProps extends DrawerCommonProps { /** * If true, when the `AppBar` gets pinned, it will stand over the `Drawer`. * @default false