fix: add PropTypes values
This commit is contained in:
1 parent
d05821e95e
commit
85e899b7db
2 files changed
+4
-2
No files matched your search
@@ -128,6 +128,8 @@ const statusToTheme = {
|
||||
paused: "warning",
|
||||
pending: "warning",
|
||||
"cannot resolve": "error",
|
||||
published: "success",
|
||||
unpublished: "error",
|
||||
};
|
||||
|
||||
const StatusLabel = ({ status, text, customStyles }) => {
|
||||
@@ -156,7 +158,7 @@ const StatusLabel = ({ status, text, customStyles }) => {
|
||||
};
|
||||
|
||||
StatusLabel.propTypes = {
|
||||
status: PropTypes.oneOf(["up", "down", "paused", "pending", "cannot resolve"]),
|
||||
status: PropTypes.oneOf(["up", "down", "paused", "pending", "cannot resolve", "published", "unpublished"]),
|
||||
text: PropTypes.string,
|
||||
customStyles: PropTypes.object,
|
||||
};
|
||||
|
||||
@@ -66,7 +66,7 @@ const StatusPagesTable = ({ data }) => {
|
||||
id: "status",
|
||||
content: "Status",
|
||||
render: (row) => {
|
||||
const status = row.isPublished ? "up" : "down";
|
||||
const status = row.isPublished ? "published" : "unpublished";
|
||||
return (
|
||||
<StatusLabel
|
||||
status={status}
|
||||
|
||||
Reference in new issue
Block a user