Skip to content

Commit

Permalink
Change name prop to channel on TimeLine
Browse files Browse the repository at this point in the history
  • Loading branch information
samboylett committed Jul 14, 2018
1 parent 1e4f252 commit 2480634
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/TimeLine.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ export type TimeLineProps = {
start: Date | number,
end: Date | number
},
name: string,
channel: React.Node,
children: React.ChildrenArray<React.Element<typeof TimeSlot>>
};

/**
* Component to render a time line row
*
* @param {TimeLineProps} props
* @param {string} props.name - Name of the channel
* @param {React.Node} props.channel - The channel for this time line
* @param {React.ChildrenArray<TimeSlot>} props.children - TimeSlots for this time line
*/
const TimeLine = ({ name, children, range }: TimeLineProps) => {
const TimeLine = ({ channel, children, range }: TimeLineProps) => {
const timeSlots = React.Children.toArray(children);

if (range) {
Expand Down Expand Up @@ -55,7 +55,7 @@ const TimeLine = ({ name, children, range }: TimeLineProps) => {
return (
<tr>
<th>
{name}
{channel}
</th>
{parsedTimeSlots}
</tr>
Expand Down
2 changes: 1 addition & 1 deletion test/spec/TimeLine.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('TimeLine', () => {

const setupComponent = (props = {}) => {
component = mount((
<TimeLine name="Foo Bar" {...props}>
<TimeLine channel="Foo Bar" {...props}>
{props.children || (<TimeSlot start={0} end={10}>Bah</TimeSlot>)}
</TimeLine>
));
Expand Down

0 comments on commit 2480634

Please sign in to comment.