apphouse
Version:
Component library for React that uses observable state management and theme-able components.
30 lines (29 loc) • 917 B
TypeScript
import { CSSProperties } from 'glamor';
import React from 'react';
import { ApphouseComponent } from '../component.interfaces';
export interface PortalStyles {
/**
* The style applied to the container of the portal
*/
container?: CSSProperties;
/**
* The style applied to the trigger button for the component
*/
button?: CSSProperties;
/**
* The style for the invisible overlay that is rendered behind the portal
* when the panel is open, clicking on this overlay will close the panel
*/
overlay?: CSSProperties;
/**
* The style applied to contentWrapper
*/
contentWrapper?: CSSProperties;
}
export interface PortalProps extends ApphouseComponent<PortalStyles> {
id: string;
children?: React.ReactNode;
toggle?: React.ReactNode;
onToggle?: (isShowing: boolean) => void;
}
export declare const Portal: React.FC<PortalProps>;