sanity
Version:
Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches
17 lines (13 loc) • 350 B
text/typescript
import {type DocumentBadgeComponent} from 'sanity'
/** @internal */
export const LiveEditBadge: DocumentBadgeComponent = (props) => {
const {liveEditSchemaType, version} = props
if (liveEditSchemaType && !version) {
return {
label: 'Live',
color: 'danger',
}
}
return null
}
LiveEditBadge.displayName = 'LiveEditBadge'