Issue #5: Creacion de boton AddToList

This commit is contained in:
Daniel Cortes
2020-06-19 05:56:55 -04:00
parent 5fea207523
commit ebda82edb3
6 changed files with 13 additions and 12 deletions

View File

@@ -0,0 +1,5 @@
import React from "react";
export const AddToList = (props) => {
return <button className='button'>Agregar a mi lista</button>
}

View File

@@ -1,10 +1,12 @@
import React from "react";
import "./Entity.scss"
import "./Entity.scss";
import {AddToList} from "./AddToList";
export const Entity = (props) => {
const hasCover = props.cover;
const hasTags = props.tags && props.tags.length > 0;
const hasButton = props.onButtonClick || props.buttonText
return (
<div className='entity'>
@@ -20,9 +22,7 @@ export const Entity = (props) => {
</ul>
}
</div>
{hasButton &&
<button className='button' onClick={props.onButtonClick}>{props.buttonText}</button>
}
<AddToList/>
</div>
{hasCover &&