[improvement] rename suffixPx to addUnit

This commit is contained in:
陈嘉涵
2019-07-08 17:42:24 +08:00
parent 1f03a703f5
commit 4b829ea7dd
15 changed files with 37 additions and 37 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
import { createNamespace, suffixPx } from '../utils';
import { createNamespace, addUnit } from '../utils';
import { inherit } from '../utils/functional';
// Types
@@ -33,7 +33,7 @@ function Skeleton(
function Title() {
if (props.title) {
return <h3 class={bem('title')} style={{ width: suffixPx(props.titleWidth) }} />;
return <h3 class={bem('title')} style={{ width: addUnit(props.titleWidth) }} />;
}
}
@@ -54,7 +54,7 @@ function Skeleton(
}
for (let i = 0; i < props.row; i++) {
Rows.push(<div class={bem('row')} style={{ width: suffixPx(getRowWidth(i)) }} />);
Rows.push(<div class={bem('row')} style={{ width: addUnit(getRowWidth(i)) }} />);
}
return Rows;
@@ -62,7 +62,7 @@ function Skeleton(
function Avatar() {
if (props.avatar) {
const size = suffixPx(props.avatarSize);
const size = addUnit(props.avatarSize);
return (
<div
class={bem('avatar', props.avatarShape)}