2023-06-12 17:20:55 +08:00
|
|
|
import React, { useState } from 'react';
|
2024-04-08 14:04:08 +08:00
|
|
|
import { CommentOutlined, CustomerServiceOutlined } from '@ant-design/icons';
|
2023-07-28 16:17:43 +08:00
|
|
|
import { FloatButton, Switch } from 'antd';
|
2023-06-12 17:20:55 +08:00
|
|
|
|
|
|
|
const App: React.FC = () => {
|
2024-08-14 09:17:56 +08:00
|
|
|
const [open, setOpen] = useState<boolean>(true);
|
2023-06-12 17:20:55 +08:00
|
|
|
return (
|
|
|
|
<>
|
2024-08-14 09:17:56 +08:00
|
|
|
<Switch onChange={setOpen} checked={open} style={{ margin: 16 }} />
|
2023-06-12 17:20:55 +08:00
|
|
|
<FloatButton.Group
|
|
|
|
open={open}
|
|
|
|
trigger="click"
|
2024-07-29 01:33:18 +08:00
|
|
|
style={{ insetInlineEnd: 24 }}
|
2023-06-12 17:20:55 +08:00
|
|
|
icon={<CustomerServiceOutlined />}
|
|
|
|
>
|
2024-08-14 09:17:56 +08:00
|
|
|
<FloatButton />
|
|
|
|
<FloatButton />
|
|
|
|
<FloatButton icon={<CommentOutlined />} />
|
|
|
|
</FloatButton.Group>
|
|
|
|
<FloatButton.Group
|
|
|
|
open={open}
|
|
|
|
shape="square"
|
|
|
|
trigger="click"
|
|
|
|
style={{ insetInlineEnd: 88 }}
|
|
|
|
icon={<CustomerServiceOutlined />}
|
|
|
|
>
|
|
|
|
<FloatButton />
|
2023-06-12 17:20:55 +08:00
|
|
|
<FloatButton />
|
|
|
|
<FloatButton icon={<CommentOutlined />} />
|
|
|
|
</FloatButton.Group>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default App;
|