DiffBox.js
1 import React, { Component } from 'react' 2 import { styled, Block, Card, Divider } from 'fannypack' 3 4 import DiffStatus from './DiffStatus' 5 import DiffView from './DiffView' 6 7 const SmallCard = styled(Card)` 8 padding: 0.4rem; 9 ` 10 11 export default class DiffBox extends Component { 12 render() { 13 return ( 14 <SmallCard 15 title={ 16 <Block backgroundColor="lightgrey"> 17 {this.props.diff.name} 18 </Block> 19 } 20 footer={ 21 <Block justifyContent="flex-end"> 22 <small>{this.props.diff.created}</small> 23 </Block> 24 } 25 > 26 <code>{this.props.diff.builds[0].filename}</code> 27 <b>{this.props.diff.builds[0].name}</b> 28 <Divider/> 29 <code>{this.props.diff.builds[0].filename}</code> 30 <b>{this.props.diff.builds[1].name}</b> 31 </SmallCard> 32 ) 33 } 34 }