Skip to content

Instantly share code, notes, and snippets.

@cereme
Created October 19, 2019 14:23
Show Gist options
  • Save cereme/f4e49ab0c2b826491100236806cd32ea to your computer and use it in GitHub Desktop.
Save cereme/f4e49ab0c2b826491100236806cd32ea to your computer and use it in GitHub Desktop.
Antdesign-export-strategy
import * as React from 'react';
import { Input } from 'antd';
const { TextArea } = Input;
export default function App(){
return (
<TextArea/>
<Input.TextArea/>
)
}
import Input from './Input';
import Group from './Group';
import Search from './Search';
import TextArea from './TextArea';
import Password from './Password';
export { InputProps } from './Input';
export { GroupProps } from './Group';
export { SearchProps } from './Search';
export { TextAreaProps } from './TextArea';
export { PasswordProps } from './Password';
Input.Group = Group;
Input.Search = Search;
Input.TextArea = TextArea;
Input.Password = Password;
export default Input;
import Group from './Group';
import Search from './Search';
import TextArea from './TextArea';
import Password from './Password';
class Input extends React.Component<InputProps, any> {
static Group: typeof Group;
static Search: typeof Search;
static TextArea: typeof TextArea;
static Password: typeof Password;
//...
class TextArea extends React.Component<TextAreaProps, TextAreaState> {
nextFrameActionId: number;
resizeFrameId: number;
state = {
textareaStyles: {},
resizing: false,
};
/...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment