@enact/sandstone
Version:
Large-screen/TV support library for Enact, containing a variety of UI components.
73 lines (59 loc) • 2.02 kB
TypeScript
// Type definitions for sandstone/FixedPopupPanels
import * as React from "react";
import { PanelProps as sandstone_Panels_PanelProps } from "@enact/sandstone/Panels";
import { HeaderProps as sandstone_Panels_HeaderProps } from "@enact/sandstone/Panels";
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;
export interface FixedPopupPanelsDecoratorProps {}
export function FixedPopupPanelsDecorator<P>(
Component: React.ComponentType<P> | string,
): React.ComponentType<P & FixedPopupPanelsDecoratorProps>;
export interface FixedPopupPanelsBaseProps {}
/**
* A base panels component for that has
left key handler to navigate panels.
*/
export class FixedPopupPanelsBase extends React.Component<
Merge<React.HTMLProps<HTMLElement>, FixedPopupPanelsBaseProps>
> {}
export interface FixedPopupPanelsProps
extends Merge<FixedPopupPanelsBaseProps, FixedPopupPanelsDecoratorProps> {
/**
* Size of the popup.
*/
width?: "narrow" | "half";
}
/**
* An instance of which restricts the `Panel` to the right
or left side of the screen inside a popup. Typically used for overlaying panels over other
content.
*/
export class FixedPopupPanels extends React.Component<
Merge<React.HTMLProps<HTMLElement>, FixedPopupPanelsProps>
> {
/**
* A shortcut to access
*/
Panel: Panel;
/**
* A shortcut to access
*/
Header: Header;
}
export interface PanelProps extends sandstone_Panels_PanelProps {}
/**
* The standard view container used inside a
view manager instance.
*/
export class Panel extends React.Component<
Merge<React.HTMLProps<HTMLElement>, PanelProps>
> {}
export interface HeaderProps extends sandstone_Panels_HeaderProps {}
/**
* A header component for a Panel with a `title` and `subtitle` , supporting several configurable
for components.
*/
export class Header extends React.Component<
Merge<React.HTMLProps<HTMLElement>, HeaderProps>
> {}
export default FixedPopupPanels;