ant-design/components/float-button/demo/render-panel.tsx
lijianan 51b973d9d5
feat: FloatButton support Badge (#41040)
* feat: FloatButton support internal Badge

* update docs

* style

* update docs

* test: update snap

* fix

* update demo

* test: update snap

* update style

* test: update snap

* test: update snap

* add docs

* fix: update style

* update

* fix

* fix

* fix

* update style

* fix

* update demo

* add

* add docs

* snap

* test: add test case

* Update components/float-button/demo/badge.md

Co-authored-by: MadCcc <1075746765@qq.com>

* fix

* docs: add debug demo

* docs: add debug demo

* test: update snap

* fix border-radius

* update snap

* fix

* fix

* rename

* style: use paddingXXS

* fix

* update demo

* update snap

* demo: add demo

---------

Co-authored-by: MadCcc <1075746765@qq.com>
2023-03-20 10:28:20 +08:00

40 lines
1.1 KiB
TypeScript

import { CustomerServiceOutlined, QuestionCircleOutlined, SyncOutlined } from '@ant-design/icons';
import { FloatButton } from 'antd';
import React from 'react';
/** Test usage. Do not use in your production. */
const { _InternalPanelDoNotUseOrYouWillBeFired: InternalFloatButton } = FloatButton;
const App: React.FC = () => (
<div style={{ display: 'flex', columnGap: 16, alignItems: 'center' }}>
<InternalFloatButton backTop />
<InternalFloatButton icon={<CustomerServiceOutlined />} />
<InternalFloatButton
icon={<QuestionCircleOutlined />}
description="HELP"
shape="square"
type="primary"
/>
<InternalFloatButton
shape="square"
items={[
{ icon: <QuestionCircleOutlined /> },
{ icon: <CustomerServiceOutlined /> },
{ icon: <SyncOutlined /> },
]}
/>
<InternalFloatButton
open
icon={<CustomerServiceOutlined />}
trigger="click"
items={[
{ icon: <QuestionCircleOutlined /> },
{ icon: <CustomerServiceOutlined /> },
{ icon: <SyncOutlined /> },
]}
/>
</div>
);
export default App;