feat: playground
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
interface WrapperProps {
|
||||
children: React.ReactNode;
|
||||
label: string;
|
||||
}
|
||||
|
||||
const Wrapper: React.FC<WrapperProps>= ({ children }) => {
|
||||
return (
|
||||
<div>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Wrapper;
|
||||
@@ -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};
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface SealFormItemProps {
|
||||
label?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user