mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-25 16:58:00 +08:00
2cdf586291
* chore: fix lint * chore: fix lint * test: fix 16 * fix: lint
21 lines
447 B
TypeScript
21 lines
447 B
TypeScript
import React from 'react';
|
|
import { Input, QRCode, Space } from 'antd';
|
|
|
|
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;
|