Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions src/components/Task.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

import React from 'react';
import PropTypes from 'prop-types';

export default function Task({ task: { id, title, state }, onArchiveTask, onPinTask }) {
return (
Expand Down Expand Up @@ -30,6 +29,7 @@ export default function Task({ task: { id, title, state }, onArchiveTask, onPinT
readOnly={true}
name="title"
placeholder="Input title"
style={{ backgroundColor: 'red' }}
/>
</label>

Expand All @@ -46,20 +46,4 @@ export default function Task({ task: { id, title, state }, onArchiveTask, onPinT
)}
</div>
);
}

Task.propTypes = {
/** Composition of the task */
task: PropTypes.shape({
/** Id of the task */
id: PropTypes.string.isRequired,
/** Title of the task */
title: PropTypes.string.isRequired,
/** Current state of the task */
state: PropTypes.string.isRequired,
}),
/** Event to change the task to archived */
onArchiveTask: PropTypes.func,
/** Event to change the task to pinned */
onPinTask: PropTypes.func,
};
}