@douyinfe/semi-ui
Version:
A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.
29 lines (28 loc) • 1.24 kB
TypeScript
/**
* The Semi Foundation / Adapter architecture split was inspired by Material Component For Web. (https://github.com/material-components/material-components-web)
* We re-implemented our own code based on the principle and added more functions we need according to actual needs.
*/
import React, { Component, ReactNode } from 'react';
import { DefaultAdapter } from '@douyinfe/semi-foundation/lib/es/base/foundation';
import { VALIDATE_STATUS } from '@douyinfe/semi-foundation/lib/es/base/constants';
import { ArrayElement } from './base';
export type ValidateStatus = ArrayElement<typeof VALIDATE_STATUS>;
export interface BaseProps {
style?: React.CSSProperties;
className?: string;
children?: ReactNode | undefined | any;
}
export default class BaseComponent<P extends BaseProps = {}, S = {}> extends Component<P, S> {
static propTypes: {};
static defaultProps: {};
cache: any;
foundation: any;
constructor(props: P);
componentDidMount(): void;
componentWillUnmount(): void;
get adapter(): DefaultAdapter<P, S>;
isControlled: (key: any) => boolean;
log(text: string, ...rest: any): any;
getDataAttr(props?: any): {};
setStateAsync: (state: Partial<S>) => Promise<void>;
}