-
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(Button): Button组件对齐 mobile-vue (#469)
* feat(Button): 同步Button组件特性 * chore: 解决开发环境无prettier导致提交校验prettier运行报错 * feat(Button): 升级Button组件样式表到v2 * feat(Demo): 更新Buttons示例样式 * chore: common仓库同步 * feat(Demo): 更新Buttons示例背景颜色 * chore: 同步新的类型规范 * docs(Button): 更新Buttons的API样式 * fix(Button-type): 更正Button组件的ref类型 * chore: 更新测试snap * chore: 更新测试snap * chore: 更新测试snap * feat(Button): 使用parseTNode包裹TNode * chore(Button): 更新测试snap * fix(Button): 去掉children类型继承 * fix(Demo): 恢复演示背景默认颜色 * fix(Button): button演示背景改为白色 * chore: snap-update
- Loading branch information
Showing
25 changed files
with
2,123 additions
and
380 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
4 files
+34 −5 | docs/mobile/api/button.md | |
+1 −1 | style/mobile/components/_index.less | |
+40 −2 | style/mobile/components/button/v2/_index.less | |
+8 −0 | style/mobile/components/button/v2/_var.less |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
exports[`Button 组件测试 > content 1`] = ` | ||
<span | ||
class="t-button__text" | ||
class="t-button__content" | ||
> | ||
按钮组件 | ||
|
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,29 @@ | ||
import React from 'react'; | ||
import { Button } from 'tdesign-mobile-react'; | ||
|
||
export default function () { | ||
return ( | ||
<> | ||
<div className="row"> | ||
<Button size="large" theme="primary"> | ||
填充按钮 | ||
</Button> | ||
<Button size="large" theme="light"> | ||
填充按钮 | ||
</Button> | ||
<Button size="large">填充按钮</Button> | ||
</div> | ||
<div className="row"> | ||
<Button size="large" theme="primary" variant="outline"> | ||
描边按钮 | ||
</Button> | ||
<Button size="large" theme="primary" variant="dashed"> | ||
虚框按钮 | ||
</Button> | ||
<Button size="large" theme="primary" variant="text"> | ||
文字按钮 | ||
</Button> | ||
</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,12 @@ | ||
import React from 'react'; | ||
import { Button } from 'tdesign-mobile-react'; | ||
|
||
export default function () { | ||
return ( | ||
<div className="row"> | ||
<Button size="large" theme="primary" block> | ||
填充按钮 | ||
</Button> | ||
</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,18 @@ | ||
import React from 'react'; | ||
import { Button } from 'tdesign-mobile-react'; | ||
|
||
export default function () { | ||
return ( | ||
<div className="row section-ghost"> | ||
<Button size="large" ghost theme="primary"> | ||
幽灵按钮 | ||
</Button> | ||
<Button size="large" ghost theme="danger"> | ||
幽灵按钮 | ||
</Button> | ||
<Button size="large" ghost> | ||
幽灵按钮 | ||
</Button> | ||
</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,15 @@ | ||
import React from 'react'; | ||
import { Button } from 'tdesign-mobile-react'; | ||
|
||
export default function () { | ||
return ( | ||
<div className="row section-group"> | ||
<Button size="large" theme="light"> | ||
组合按钮 | ||
</Button> | ||
<Button size="large" theme="primary"> | ||
组合按钮 | ||
</Button> | ||
</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,17 @@ | ||
import React from 'react'; | ||
import { Button } from 'tdesign-mobile-react'; | ||
import { Icon } from 'tdesign-icons-react'; | ||
|
||
export default function () { | ||
return ( | ||
<div className="row"> | ||
<Button theme="primary" size="large" icon={<Icon name="app" />}> | ||
填充按钮 | ||
</Button> | ||
<Button theme="primary" size="large" loading> | ||
加载中 | ||
</Button> | ||
<Button theme="primary" size="large" shape="square" icon={<Icon name="search" />} /> | ||
</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,52 @@ | ||
import React from 'react'; | ||
import TDemoBlock from '../../../site/mobile/components/DemoBlock'; | ||
import TDemoHeader from '../../../site/mobile/components/DemoHeader'; | ||
import './style/index.less'; | ||
import BaseDemo from './base'; | ||
import IconDemo from './icon'; | ||
import GhostDemo from './ghost'; | ||
import GroupDemo from './group'; | ||
import BlockDemo from './block'; | ||
import SizeDemo from './size'; | ||
import StatusDemo from './status'; | ||
import ShapeDemo from './shape'; | ||
import ThemeDemo from './theme'; | ||
|
||
export default function Base() { | ||
return ( | ||
<div className="tdesign-mobile-demo"> | ||
<TDemoHeader title="Button 按钮" summary="按钮用于开启一个闭环的操作任务,如“删除”对象、“购买”商品等。" /> | ||
<TDemoBlock title="01 组件类型" summary="基础按钮"> | ||
<BaseDemo /> | ||
</TDemoBlock> | ||
<TDemoBlock summary="图标按钮"> | ||
<IconDemo /> | ||
</TDemoBlock> | ||
<TDemoBlock summary="幽灵按钮"> | ||
<GhostDemo /> | ||
</TDemoBlock> | ||
<TDemoBlock summary="组合按钮"> | ||
<GroupDemo /> | ||
</TDemoBlock> | ||
<TDemoBlock summary="通栏按钮"> | ||
<BlockDemo /> | ||
</TDemoBlock> | ||
|
||
<TDemoBlock title="02 组件状态" summary="按钮禁用态"> | ||
<StatusDemo /> | ||
</TDemoBlock> | ||
|
||
<TDemoBlock title="03 组件样式" summary="按钮尺寸"> | ||
<SizeDemo /> | ||
</TDemoBlock> | ||
|
||
<TDemoBlock summary="按钮形状"> | ||
<ShapeDemo /> | ||
</TDemoBlock> | ||
|
||
<TDemoBlock summary="按钮主题"> | ||
<ThemeDemo /> | ||
</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,23 @@ | ||
import React from 'react'; | ||
import { Button } from 'tdesign-mobile-react'; | ||
import { Icon } from 'tdesign-icons-react'; | ||
|
||
export default function () { | ||
return ( | ||
<> | ||
<div className="row section-shape"> | ||
<Button theme="primary" size="large"> | ||
填充按钮 | ||
</Button> | ||
<Button theme="primary" size="large" shape="square" aria-label="搜索" icon={<Icon name="search" />}></Button> | ||
<Button theme="primary" size="large" shape="round"> | ||
填充按钮 | ||
</Button> | ||
<Button theme="primary" size="large" shape="circle" aria-label="搜索" icon={<Icon name="search" />}></Button> | ||
</div> | ||
<Button theme="primary" size="large" block className="rectangle-button"> | ||
填充按钮 | ||
</Button> | ||
</> | ||
); | ||
} |
Oops, something went wrong.