demo: update badge demo (#43307)

This commit is contained in:
afc163 2023-07-01 01:29:54 +08:00 committed by GitHub
parent 5c0f632235
commit 6ead5ae5ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 17 deletions

View File

@ -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>
</span>
<div
class="ant-ribbon-corner"

View File

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

View File

@ -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>