Skip to content

Instantly share code, notes, and snippets.

@brunocroh
Created October 19, 2017 11:36
Show Gist options
  • Save brunocroh/ae62cfe2e5e80d39e955a464685e3aa4 to your computer and use it in GitHub Desktop.
Save brunocroh/ae62cfe2e5e80d39e955a464685e3aa4 to your computer and use it in GitHub Desktop.
import BaseComponent from '../Base/base.component';
import style from './card.component.css';
export default class CardComponent extends BaseComponent{
constructor(element, data){
super(element);
this.render(data);
this._alturaDeCelulaResponsiva();
}
_template(data){
return `
<div class="col-md-12">
<div class="col-xs-1 hidden-xs altura-card ${style.containerStatus}" >
<i class="fa fa-check fa-2x" style="color: white;" aria-hidden="true"></i>
</div>
<div class="col-xs-10 containerInformacoes ${style.containerInformacoes}">
<div class="row" style="margin: 10px;">
<div class="col-xs-12" style="margin-bottom: 10px;">
<strong >Descricao da Tarefa</strong>
</div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
Nome do Responsável
</div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
17/10/2017
</div>
</div>
</div>
<div class="col-xs-1 altura-card" style="background-color: #58b958; text-align: center;">
<i class="fa fa-pencil fa-2x" style="color: white;position: relative;top: calc(50%-10);" aria-hidden="true"></i>
</div>
</div>
`
}
_alturaDeCelulaResponsiva(){
setTimeout(() =>{
var altura = $('.'+style.containerInformacoes).height();
$(".altura-card").height(altura);
}, 1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment