feat: playground

This commit is contained in:
jialin
2024-05-15 19:36:17 +08:00
parent 72a53424fa
commit fd9f3d8bd9
19 changed files with 380 additions and 20 deletions
@@ -0,0 +1,14 @@
interface WrapperProps {
children: React.ReactNode;
label: string;
}
const Wrapper: React.FC<WrapperProps>= ({ children }) => {
return (
<div>
{children}
</div>
);
}
export default Wrapper;
+24
View File
@@ -0,0 +1,24 @@
import { Input } from 'antd';
import type { InputProps } from 'antd';
import Wrapper from './components/wrapper';
import { SealFormItemProps } from './types';
const TextArea: React.FC<InputProps & SealFormItemProps> = (props) => {
return (
<Wrapper label="input">
<Input.TextArea placeholder='send your message' autoSize={{minRows: 1,maxRows: 6}} size="large" variant='borderless'></Input.TextArea>
</Wrapper>
);
}
const SealInput: React.FC<InputProps & SealFormItemProps> = (props) => {
const {label, ...rest} = props;
return (
<Wrapper label="input">
<Input {...rest} placeholder='send your message'></Input>
</Wrapper>
);
}
export default {TextArea,Input: SealInput};
+3
View File
@@ -0,0 +1,3 @@
export interface SealFormItemProps {
label?: string;
}