Browse Source

demo: update badge demo (#43307)

pull/43317/head
afc163 1 year ago
committed by GitHub
parent
commit
6ead5ae5ef
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      components/badge/__tests__/__snapshots__/demo-extend.test.ts.snap
  2. 6
      components/badge/__tests__/__snapshots__/demo.test.ts.snap
  3. 9
      components/badge/demo/ribbon.tsx

6
components/badge/__tests__/__snapshots__/demo-extend.test.ts.snap

@ -1976,11 +1976,7 @@ exports[`renders components/badge/demo/ribbon.tsx extend context correctly 1`] =
<span
class="ant-ribbon-text"
>
<div>
Hippies
<br />
Happy
</div>
Hippies
</span>
<div
class="ant-ribbon-corner"

6
components/badge/__tests__/__snapshots__/demo.test.ts.snap

@ -1977,11 +1977,7 @@ exports[`renders components/badge/demo/ribbon.tsx correctly 1`] = `
<span
class="ant-ribbon-text"
>
<div>
Hippies
<br />
Happy
</div>
Hippies
</span>
<div
class="ant-ribbon-corner"

9
components/badge/demo/ribbon.tsx

@ -1,5 +1,5 @@
import React from 'react';
import { Badge, Card, Space } from 'antd';
import React from 'react';
const App: React.FC = () => (
<Space direction="vertical" size="middle" style={{ width: '100%' }}>
@ -8,12 +8,7 @@ const App: React.FC = () => (
and raises the spyglass.
</Card>
</Badge.Ribbon>
<Badge.Ribbon text={
<div>
Hippies <br />
Happy
</div>
} color="pink">
<Badge.Ribbon text="Hippies" color="pink">
<Card title="Pushes open the window" size="small">
and raises the spyglass.
</Card>

Loading…
Cancel
Save