gcg-website/static/admin/previews/field-previews/draft-preview.js
2023-05-29 16:22:34 +02:00

22 lines
497 B
JavaScript

const DraftPreview = ({ value }) =>
h(
"div",
{
style: {
backgroundColor: value === true ? "rgb(37 99 235)" : "rgb(22 163 74)",
color: "white",
border: "none",
padding: "2px 6px",
textAlign: "center",
textDecoration: "none",
display: "inline-block",
cursor: "pointer",
borderRadius: "4px",
fontSize: "14px",
},
},
value ? "Entwurf" : "Veröffentlicht"
);
export default DraftPreview;