diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/history/history-item.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/history/history-item.element.ts new file mode 100644 index 0000000000..1db73bb340 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/history/history-item.element.ts @@ -0,0 +1,97 @@ +import { css, html } from 'lit'; +import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; +import { customElement, property } from 'lit/decorators.js'; +import { UmbLitElement } from '@umbraco-cms/element'; + +@customElement('umb-history-item') +export class UmbHistoryItemElement extends UmbLitElement { + static styles = [ + UUITextStyles, + css` + :host { + --avatar-size: calc(2em + 4px); + display: block; + } + + #wrapper { + display: flex; + width: 100%; + gap: calc(2 * var(--uui-size-space-5)); + align-items: center; + } + .slots-wrapper { + display: flex; + justify-content: space-between; + align-items: center; + flex: 1; + } + + slot[name='actions'] { + --uui-button-border-radius: 50px 50px 50px 50px; + display: flex; + align-items: center; + --uui-button-height: calc(var(--uui-size-2) * 4); + margin-right: var(--uui-size-2); + } + #actions-container { + opacity: 0; + transition: opacity 120ms; + } + :host(:hover) #actions-container { + opacity: 1; + } + + :host(:hover) #actions-container { + opacity: 1; + } + + .user-info { + display: flex; + align-items: flex-end; + gap: var(--uui-size-space-5); + } + .user-info div { + display: flex; + flex-direction: column; + } + .detail { + font-size: var(--uui-size-4); + color: var(--uui-color-text-alt); + line-height: 1; + } + `, + ]; + + @property({ type: String }) + src?: string; + + @property({ type: String }) + name?: string; + + @property({ type: String }) + detail?: string; + + render() { + return html`