feat(Grid): add direction prop (#6256)

This commit is contained in:
neverland
2020-05-11 15:47:55 +08:00
committed by GitHub
parent 67716c65e3
commit 45f3c9e759
7 changed files with 96 additions and 25 deletions
+17 -7
View File
@@ -120,7 +120,14 @@ export default createComponent({
},
render() {
const { center, border, square, gutter, clickable } = this.parent;
const {
center,
border,
square,
gutter,
direction,
clickable,
} = this.parent;
return (
<div class={[bem({ square })]} style={this.style}>
@@ -129,12 +136,15 @@ export default createComponent({
role={clickable ? 'button' : null}
tabindex={clickable ? 0 : null}
class={[
bem('content', {
center,
square,
clickable,
surround: border && gutter,
}),
bem('content', [
direction,
{
center,
square,
clickable,
surround: border && gutter,
},
]),
{ [BORDER]: border },
]}
onClick={this.onClick}