1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-10 21:30:06 +02:00

editing story to pull in react component instead of string

This commit is contained in:
Alex Windett 2017-01-20 14:47:29 +00:00
parent e7905322a5
commit 3b6817640f
2 changed files with 17 additions and 16 deletions

View File

@ -7,35 +7,36 @@ const {
const Table = require('./');
const memberDetail = (name) => {
return (
<div>
<h4>{name}</h4>
<small>{name}@biztech.com</small>
</div>
);
};
const columns = [{
title: 'Memeber',
dataID: 'member',
dataKey: 'member',
width: ''
width: '50%'
}, {
title: 'Status',
dataID: 'status',
dataKey: 'status',
width: ''
width: '10%'
}, {
title: 'Role',
dataID: 'role',
dataKey: 'role',
width: ''
width: '20%'
}, {
title: '',
dataID: 'delete',
dataKey: 'delete',
width: ''
width: '20%'
}];
const data = [{
name: 'Nicola',
name: memberDetail('Nicola'),
status: 'Active',
role: 'Owner',
key: 1
}, {
name: 'Alex',
name: memberDetail('Alex'),
status: 'Inactive',
role: 'Read Only',
key: 2

View File

@ -15,7 +15,7 @@ const StyledRow = styled.tr`
border: solid ${remcalc(1)} #d8d8d8;
`;
const StyledTaleItem = styled.td`
const StyledTableItem = styled.td`
padding: ${remcalc(24)};
`;
@ -27,7 +27,7 @@ const Row = ({
const rowItems = Object.keys(_dataItem).map( (item, i) => {
const value = _dataItem[item];
return <StyledTaleItem key={i}>{value}</StyledTaleItem>;
return <StyledTableItem key={i}>{value}</StyledTableItem>;
});
return (