ant-design/components/float-button/demo/badge-debug.tsx
二货爱吃白萝卜 2cdf586291
chore: fix lint (#43873)
* chore: fix lint

* chore: fix lint

* test: fix 16

* fix: lint
2023-07-28 16:17:43 +08:00

23 lines
573 B
TypeScript

import React, { useState } from 'react';
import { ConfigProvider, FloatButton, Slider } from 'antd';
import type { AliasToken } from 'antd/es/theme/interface';
const App: React.FC = () => {
const [radius, setRadius] = useState<number>(0);
const token: Partial<AliasToken> = {
borderRadius: radius,
};
return (
<>
<Slider min={0} max={20} style={{ margin: 16 }} onChange={setRadius} />
<ConfigProvider theme={{ token }}>
<FloatButton shape="square" badge={{ dot: true }} />
</ConfigProvider>
</>
);
};
export default App;