From dc447c023e01c0b9ad50d42e2f8eadfd9dd0734c Mon Sep 17 00:00:00 2001 From: frab1t <33671357+frab1t@users.noreply.github.com> Date: Fri, 10 May 2019 14:39:30 +0200 Subject: [PATCH] refactoring card --- src/components/Card.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/components/Card.js b/src/components/Card.js index 36ac218..36948ec 100644 --- a/src/components/Card.js +++ b/src/components/Card.js @@ -15,18 +15,26 @@ class Card extends Component { } render() { - let textAlign = ""; + let bodyAlign; + let headAlign; if (this.props.align) { - textAlign = `text-${this.props.align}`; + bodyAlign = `text-${this.props.bodyAlign}`; } + if (this.props.headAlign) { + headAlign = `text-${this.props.headAlign}`; + } + return ( -
- + -

{this.props.title}

+

+ {this.props.title} +

{this.props.subtitle} @@ -36,7 +44,6 @@ class Card extends Component {
- ); } }