Import
import { EntityStatusBadge } from '@contentful/f36-components';
import { EntityStatusBadge } from '@contentful/f36-badge';
Examples
EntityStatusBadge can represent different entity statuses. The value is passed as an entityStatus
property and displayed as content in the badge:
Published
function EntityStatusBadgePublishedExample() {
return <EntityStatusBadge entityStatus="published" />;
}
Draft
function EntityStatusBadgeDraftExample() {
return <EntityStatusBadge entityStatus="draft" />;
}
Archived
function EntityStatusBadgeArchivedExample() {
return <EntityStatusBadge entityStatus="archived" />;
}
Changed
function EntityStatusBadgeChangedExample() {
return <EntityStatusBadge entityStatus="changed" />;
}
Deleted
function EntityStatusBadgeDeletedExample() {
return <EntityStatusBadge entityStatus="deleted" />;
}
New
function EntityStatusBadgeNewExample() {
return <EntityStatusBadge entityStatus="new" />;
}
With scheduled actions
Some entities have scheduled actions, for instance an entry might be scheduled to be published at a specific time later on:
function EntityStatusBadgeScheduledExample() {
return <EntityStatusBadge entityStatus="changed" isScheduled />;
}
Props (API reference)