Browse Source

use operation-unit function

pull/16187/head
陈帅 6 years ago
parent
commit
a1c4d9f45b
  1. 2
      components/_util/transButton.tsx
  2. 4
      components/page-header/index.tsx
  3. 6
      components/page-header/style/index.less
  4. 1
      components/style/mixins/index.less
  5. 18
      components/style/mixins/operationUnit.less
  6. 17
      components/typography/style/index.less

2
components/_util/transButton.tsx

@ -57,7 +57,7 @@ class TransButton extends React.Component<TransButtonProps> {
return (
<div
role="button"
tabIndex={-1}
tabIndex={0}
ref={this.setRef}
{...this.props}
onKeyDown={this.onKeyDown}

4
components/page-header/index.tsx

@ -42,7 +42,9 @@ const renderBack = (
}
}}
>
<TransButton aria-label={back}>{backIcon}</TransButton>
<TransButton className={`${prefixCls}-back-icon-button`} aria-label={back}>
{backIcon}
</TransButton>
<Divider type="vertical" />
</div>
)}

6
components/page-header/style/index.less

@ -20,8 +20,10 @@
font-size: 16px;
line-height: 100%;
cursor: pointer;
i:hover {
color: @primary-color;
&-button {
.operation-unit();
color: @text-color;
}
}

1
components/style/mixins/index.less

@ -6,3 +6,4 @@
@import 'iconfont';
@import 'motion';
@import 'reset';
@import 'operationUnit';

18
components/style/mixins/operationUnit.less

@ -0,0 +1,18 @@
@import '../../style/themes/default';
.operation-unit() {
color: @link-color;
text-decoration: none;
outline: none;
cursor: pointer;
transition: color 0.3s;
&:focus,
&:hover {
color: @link-hover-color;
}
&:active {
color: @link-active-color;
}
}

17
components/typography/style/index.less

@ -30,23 +30,6 @@
.typography-title(@heading-4-size, 1.4);
}
.operation-unit() {
color: @link-color;
text-decoration: none;
outline: none;
cursor: pointer;
transition: color 0.3s;
&:focus,
&:hover {
color: @link-hover-color;
}
&:active {
color: @link-active-color;
}
}
// =============== Basic ===============
.@{typography-prefix-cls} {
color: @text-color;

Loading…
Cancel
Save