-
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.
feat(CountDown): new count-down (#481)
* feat(CountDown): new count-down * chore: update common * chore: update common --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
39b8f64
commit cb70b70
Showing
21 changed files
with
2,024 additions
and
234 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
Submodule _common
updated
2 files
+21 −0 | docs/mobile/api/count-down.en-US.md | |
+8 −3 | docs/mobile/api/count-down.md |
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 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 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,52 @@ | ||
import React from 'react'; | ||
import { CountDown } from 'tdesign-mobile-react'; | ||
|
||
const time = 96 * 60 * 1000; | ||
|
||
export default function BaseCountDown() { | ||
return ( | ||
<> | ||
<div className="demo-count-down"> | ||
<text className="demo-count-down-desc"> 时分秒 </text> | ||
<div className="demo-count-down-content"> | ||
<CountDown time={time} /> | ||
</div> | ||
</div> | ||
|
||
<div className="demo-count-down"> | ||
<text className="demo-count-down-desc"> 带毫秒 </text> | ||
<div className="demo-count-down-content"> | ||
<CountDown time={time} millisecond /> | ||
</div> | ||
</div> | ||
|
||
<div className="demo-count-down"> | ||
<text className="demo-count-down-desc"> 带方形底 </text> | ||
<div className="demo-count-down-content"> | ||
<CountDown content="default" time={time} theme="square" /> | ||
</div> | ||
</div> | ||
|
||
<div className="demo-count-down"> | ||
<text className="demo-count-down-desc"> 带圆形底 </text> | ||
<div className="demo-count-down-content"> | ||
<CountDown time={time} theme="round" /> | ||
</div> | ||
</div> | ||
|
||
<div className="demo-count-down"> | ||
<text className="demo-count-down-desc"> 带单位 </text> | ||
<div className="demo-count-down-content"> | ||
<CountDown time={time} split-with-unit theme="round" /> | ||
</div> | ||
</div> | ||
|
||
<div className="demo-count-down"> | ||
<text className="demo-count-down-desc"> 无底色带单位 </text> | ||
<div className="demo-count-down-content"> | ||
<CountDown className="custom" time={time} split-with-unit /> | ||
</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,21 @@ | ||
import React from 'react'; | ||
import TDemoHeader from '../../../site/mobile/components/DemoHeader'; | ||
import TDemoBlock from '../../../site/mobile/components/DemoBlock'; | ||
import BaseCountDown from './base'; | ||
import SizeCountDown from './size'; | ||
|
||
import './style/index.less'; | ||
|
||
export default function CountDownDemo() { | ||
return ( | ||
<div className="tdesign-mobile-demo"> | ||
<TDemoHeader title="CountDown倒计时" summary="用于实时展示倒计时数值。" /> | ||
<TDemoBlock title="01 组件类型" padding={true}> | ||
<BaseCountDown /> | ||
</TDemoBlock> | ||
<TDemoBlock title="02 组件尺寸" summary="倒计时 large/medium/small 尺寸" padding={true}> | ||
<SizeCountDown /> | ||
</TDemoBlock> | ||
</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,75 @@ | ||
import React from 'react'; | ||
import { CountDown } from 'tdesign-mobile-react'; | ||
|
||
const time = 96 * 60 * 1000; | ||
|
||
export default function SizeCountDown() { | ||
return ( | ||
<> | ||
<div className="demo-count-down"> | ||
<text className="demo-count-down-desc"> 时分秒 </text> | ||
<div className="demo-count-down-content"> | ||
<CountDown size="small" time={time} /> | ||
</div> | ||
<div className="demo-count-down-content"> | ||
<CountDown time={time} /> | ||
</div> | ||
<div className="demo-count-down-content"> | ||
<CountDown size="large" time={time} /> | ||
</div> | ||
</div> | ||
|
||
<div className="demo-count-down"> | ||
<text className="demo-count-down-desc"> 带毫秒 </text> | ||
<div className="demo-count-down-content"> | ||
<CountDown size="small" time={time} millisecond /> | ||
</div> | ||
<div className="demo-count-down-content"> | ||
<CountDown format="HH:mm:ss:SSS" time={time} /> | ||
</div> | ||
<div className="demo-count-down-content"> | ||
<CountDown size="large" time={time} millisecond /> | ||
</div> | ||
</div> | ||
|
||
<div className="demo-count-down"> | ||
<text className="demo-count-down-desc"> 带方形底 </text> | ||
<div className="demo-count-down-content"> | ||
<CountDown size="small" time={time} theme="square" /> | ||
</div> | ||
<div className="demo-count-down-content"> | ||
<CountDown time={time} theme="square" /> | ||
</div> | ||
<div className="demo-count-down-content"> | ||
<CountDown size="large" time={time} theme="square" /> | ||
</div> | ||
</div> | ||
|
||
<div className="demo-count-down"> | ||
<text className="demo-count-down-desc"> 带圆形底 </text> | ||
<div className="demo-count-down-content"> | ||
<CountDown size="small" time={time} theme="round" /> | ||
</div> | ||
<div className="demo-count-down-content"> | ||
<CountDown time={time} theme="round" /> | ||
</div> | ||
<div className="demo-count-down-content"> | ||
<CountDown size="large" time={time} theme="round" /> | ||
</div> | ||
</div> | ||
|
||
<div className="demo-count-down"> | ||
<text className="demo-count-down-desc"> 带单位 </text> | ||
<div className="demo-count-down-content"> | ||
<CountDown size="small" time={time} split-with-unit theme="round" /> | ||
</div> | ||
<div className="demo-count-down-content"> | ||
<CountDown time={time} split-with-unit theme="round" /> | ||
</div> | ||
<div className="demo-count-down-content"> | ||
<CountDown size="large" time={time} split-with-unit theme="round" /> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
} |
Oops, something went wrong.