Browse Source

Adds a button container component

main
Keith Daulton 1 year ago
parent
commit
890d7358cd
1 changed files with 37 additions and 0 deletions
  1. +37
    -0
      src/webviews/apps/shared/components/button-container.ts

+ 37
- 0
src/webviews/apps/shared/components/button-container.ts View File

@ -0,0 +1,37 @@
import { css, html, LitElement } from 'lit';
import { customElement } from 'lit/decorators.js';
import { elementBase } from './styles/lit/base.css';
@customElement('button-container')
export class ButtonContainer extends LitElement {
static override styles = [
elementBase,
css`
:host {
display: block;
max-width: 30rem;
margin-right: auto;
margin-left: auto;
text-align: left;
transition: max-width 0.2s ease-out;
}
@media (min-width: 640px) {
:host {
max-width: 100%;
}
}
.group {
display: inline-flex;
gap: 0.1rem;
width: 100%;
max-width: 30rem;
}
`,
];
override render() {
return html`<div class="group"><slot></slot></div>`;
}
}

Loading…
Cancel
Save