UNPKG

jamis

Version:

一种支持通过JSON配置方式生成页面的组件库

25 lines (24 loc) 952 B
import React from 'react'; import type { RendererProps, SchemaClassName } from 'jamis-core'; import type { WrapperSchema } from '../types'; export interface WrapperProps extends Pick<RendererProps, 'render' | 'data'>, Omit<WrapperSchema, 'className' | 'type'> { className?: SchemaClassName; children?: JSX.Element | ((props?: any) => JSX.Element); } interface WrapperState { collapsed: boolean; } export default class Wrapper extends React.Component<WrapperProps, WrapperState> { static propsList: Array<string>; static defaultProps: Partial<WrapperProps>; bodyRendered: boolean; constructor(props: WrapperProps); componentDidUpdate(prevProps: Readonly<WrapperProps>): void; toggleCollapsed: () => void; renderBody(): JSX.Element | null; render(): JSX.Element | null; } export declare class WrapperRenderer extends React.Component<WrapperProps & RendererProps, any> { render(): JSX.Element; } export {};