-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
What if I want to render my own footer in the cards. Why is it mandatory to use the avatar given. And even if I keep the avatar prop null it still takes space. Don't you think it is better to make it more generic where if the card's avatar prop is null it takes no space in the card?
{cards && cards.map((card, id) => (
<Card
key={`card-${card.image}`}
flex
borderless
shadowColor={theme.COLORS.BLACK}
titleColor={card.full ? theme.COLORS.WHITE : null}
style={styles.card}
image={card.image}
imageStyle={[card.padded ? styles.rounded : null]}
imageBlockStyle={[
card.padded ? { padding: theme.SIZES.BASE / 2 } : null,
card.full ? null : styles.noRadius,
styles.cardImage
]}
footerStyle={card.full ? styles.full : null}
>
<Block flex row space="around" >
{card.full ? <LinearGradient colors={['transparent', 'rgba(0,0,0, 0.3)']} style={styles.gradient} /> : null}
<Block flex={0.3}>{renderAvatar(card.avatar)}</Block>
{renderVote(card.vote)}
{renderLike(card.like)}
</Block>
</Card>
))}
Metadata
Metadata
Assignees
Labels
No labels