-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #299 from teal-front/feature/badge-demo
feat(Badge): update demo
- Loading branch information
Showing
12 changed files
with
117 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react'; | ||
import { Badge } from 'tdesign-mobile-react'; | ||
|
||
export default function BadgeBaseDemo() { | ||
return ( | ||
<div className="tdesign-mobile-demo"> | ||
<div className="badge-demo"> | ||
<div className="badge-item"> | ||
<Badge dot>消息</Badge> | ||
</div> | ||
<div className="badge-item"> | ||
<Badge count="16">消息</Badge> | ||
</div> | ||
<div className="badge-item"> | ||
<Badge count="NEW">消息</Badge> | ||
</div> | ||
<div className="badge-item"> | ||
<Badge count="···">消息</Badge> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react'; | ||
import { Badge, Button } from 'tdesign-mobile-react'; | ||
|
||
export default function BadgeButtonDemo() { | ||
return ( | ||
<div className="tdesign-mobile-demo"> | ||
<div className="badge-demo"> | ||
<div className="badge-item"> | ||
<Badge dot> | ||
<Button size="small" variant="outline"> | ||
小按钮 | ||
</Button> | ||
</Badge> | ||
</div> | ||
<div className="badge-item"> | ||
<Badge count="16"> | ||
<Button size="small" variant="outline"> | ||
小按钮 | ||
</Button> | ||
</Badge> | ||
</div> | ||
|
||
<div className="badge-item"> | ||
<Badge count="NEW"> | ||
<Button size="small" variant="outline"> | ||
小按钮 | ||
</Button> | ||
</Badge> | ||
</div> | ||
<div className="badge-item"> | ||
<Badge count="···"> | ||
<Button size="small" variant="outline"> | ||
小按钮 | ||
</Button> | ||
</Badge> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from 'react'; | ||
import { Badge, CellGroup, Cell } from 'tdesign-mobile-react'; | ||
|
||
export default function BadgeCellDemo() { | ||
return ( | ||
<div className="tdesign-mobile-demo" style={{ paddingTop: 10 }}> | ||
<CellGroup style={{ overflow: 'hidden' }}> | ||
<Cell title="单行标题" arrow note={<Badge dot />}></Cell> | ||
<Cell title="单行标题" arrow note={<Badge count={16} />}></Cell> | ||
<Cell | ||
title="单行标题" | ||
arrow | ||
note={ | ||
<> | ||
<Badge count="NEW" shape="round" /> | ||
<Badge count="NEW" style={{ marginLeft: '8px' }} /> | ||
</> | ||
} | ||
></Cell> | ||
<Cell title="单行标题" note={<Badge count="NEW" shape="ribbon" />}></Cell> | ||
</CellGroup> | ||
</div> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
.badge-demo { | ||
display: flex; | ||
padding: 16px 0; | ||
width: 100%; | ||
|
||
&__container { | ||
width: 24%; | ||
text-align: center; | ||
position: relative; | ||
} | ||
.badge-item { | ||
width: 24%; | ||
text-align: center; | ||
} | ||
} | ||
.tdesign-mobile-demo { | ||
.badge-demo { | ||
display: flex; | ||
padding: 16px 0; | ||
width: 100%; | ||
|
||
&__container { | ||
width: 24%; | ||
text-align: center; | ||
position: relative; | ||
} | ||
|
||
.badge-item { | ||
width: 24%; | ||
text-align: center; | ||
} | ||
} | ||
} |
Oops, something went wrong.