ant-design/components/qrcode/demo/customColor.tsx
菠萝吹雪 0e94620a74
feat: Added bgColor attribute to fix the problem that the background c… (#42214)
* fix: Added bgColor attribute to fix the problem that the background color of the QR code is displayed incorrectly when downloading

* chorn: update snap

* fix: 新增版本号

* fix: update snap

* fix: 去除多余代码

* fix: update snap

---------

Co-authored-by: pineapple <zhanglongchao@shizhuang-inc.com>
2023-05-09 17:24:28 +08:00

21 lines
438 B
TypeScript

import { QRCode, Space, theme } from 'antd';
import React from 'react';
const { useToken } = theme;
const App: React.FC = () => {
const { token } = useToken();
return (
<Space>
<QRCode value="https://ant.design/" color={token.colorSuccessText} />
<QRCode
value="https://ant.design/"
color={token.colorInfoText}
bgColor={token.colorBgLayout}
/>
</Space>
);
};
export default App;