ant-design/components/badge/demo/offset.md
MadCcc 6776bb8916
docs: demo support react18 (#34843)
* docs: update demo

* chore: add script

* test: fix demo test

* docs: convert demos

* chore: move script

* test: remove react-dom import

* chore: update deps

* docs: update riddle js

* test: fix image test

* docs: fix riddle demo
2022-04-03 23:27:45 +08:00

533 B

order title
6
zh-CN en-US
自定义位置偏移 Offset

zh-CN

设置状态点的位置偏移,格式为 [left, top],表示状态点距默认位置左侧、上方的偏移量。

en-US

Set offset of the badge dot, the format is [left, top], which represents the offset of the status dot from the left and top of the default position.

import { Badge, Avatar } from 'antd';

export default () => (
  <Badge count={5} offset={[10, 10]}>
    <Avatar shape="square" size="large" />
  </Badge>
);