1import {2 WebComponent,3 html,4 css,5 is,6 when,7} from '@beforesemicolon/web-component'8 9class StatusPill extends WebComponent {10 static observedAttributes = ['status']11 status = 'ready'12 13 stylesheet = css`14 :host {15 display: inline-flex;16 border-radius: 999px;17 padding: 0.35rem 0.7rem;18 background: ${when(19 is(this.props.status, 'ready'),20 '#dcfce7',21 '#dbeafe'22 )};23 color: ${when(24 is(this.props.status, 'ready'),25 '#166534',26 '#1d4ed8'27 )};28 }29 `30 31 render() {32 return html`<slot>${this.props.status}</slot>`33 }34}35 36customElements.define('status-pill', StatusPill)