mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 17:19:11 +08:00
5bf08faeea
* refactor: rename qrcode to qr-code * test: patch test case * chore: fix Form missing displayName * chore: patch displayName * chore: style path * chore: fix compile
21 lines
447 B
TypeScript
21 lines
447 B
TypeScript
import { Input, QRCode, Space } from 'antd';
|
|
import React from 'react';
|
|
|
|
const App: React.FC = () => {
|
|
const [text, setText] = React.useState('https://ant.design/');
|
|
|
|
return (
|
|
<Space direction="vertical" align="center">
|
|
<QRCode value={text || '-'} />
|
|
<Input
|
|
placeholder="-"
|
|
maxLength={60}
|
|
value={text}
|
|
onChange={(e) => setText(e.target.value)}
|
|
/>
|
|
</Space>
|
|
);
|
|
};
|
|
|
|
export default App;
|