Browse Source

dome: optimize FloatBotton demo style (#42980)

* docs: FloatBotton open 属性说明

* test: update snapshots

* demo: add controlled demo

* demo: update demo

* feat: add warning

* feat: update warning

* demo: update controlled demo

* demo: prettify demo style

* demo: update snapshots

---------

Co-authored-by: 二货机器人 <smith3816@gmail.com>
pull/42990/head
dingkang 1 year ago
committed by GitHub
parent
commit
ad8dd24cc8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      components/float-button/__tests__/__snapshots__/demo-extend.test.ts.snap
  2. 1
      components/float-button/__tests__/__snapshots__/demo.test.ts.snap
  3. 2
      components/float-button/demo/controlled.tsx

1
components/float-button/__tests__/__snapshots__/demo-extend.test.ts.snap

@ -855,6 +855,7 @@ Array [
aria-checked="true"
class="ant-switch ant-switch-checked"
role="switch"
style="margin: 16px;"
type="button"
>
<div

1
components/float-button/__tests__/__snapshots__/demo.test.ts.snap

@ -645,6 +645,7 @@ Array [
aria-checked="true"
class="ant-switch ant-switch-checked"
role="switch"
style="margin:16px"
type="button"
>
<div

2
components/float-button/demo/controlled.tsx

@ -20,7 +20,7 @@ const App: React.FC = () => {
<FloatButton />
<FloatButton icon={<CommentOutlined />} />
</FloatButton.Group>
<Switch onChange={onChange} checked={open} />
<Switch onChange={onChange} checked={open} style={{ margin: 16 }} />
</>
);
};

Loading…
Cancel
Save