const styles = ` :host, :root { --default-font-family: 'Open Sans'; --default-font-family: normal; --default-font-color: var(--color-grey-900); --default-font-weight: 400; --color-white: #fff; --color-black: #000; --color-grey-900: #353B48; --color-grey-500: #656D78; --color-grey-200: #E6E9ED; --color-grey-100: #F5F7FA; --color-blue-900: #124E8F; --color-blue-500: #2286E6; --color-blue-200: #A6CEF5; --color-blue-100: #E8F3FD; --theme-palette-primary-light: var(--color-blue-100); --theme-palette-paper-background: var(--color-white); --theme-palette-divider: var(--color-grey-100); --theme-palette-border: var(--color-grey-100); --theme-palette-border-hover: var(--color-grey-200); --border-radius-size: 5px; --border-width: 1px; --button-border-radius: var(--border-radius-size); --button-border-stroke:var(--border-width); --button-background-color: var(--theme-palette-paper-background); --button-background-color--hover: var(--color-grey-100); --button-border-color: var(--theme-palette-border); --button-border-color--hover: var(--theme-palette-border-hover); --button-border: var(--button-border-stroke) solid var(--button-border-color); --button-border--hover: var(--button-border-stroke) solid var(--button-border-color--hover); --button-title-color: var(--color-grey-900); --button-description-color: var(--color-grey-500); --button-title-font-size: 16px; --button-description-font-size: var(--color-grey-500); --button-title-font-size: var(--color-grey-900); --button-description-font-size: var(--color-grey-500); font-family: var(--default-font-family); font-size: var(--default-font-size); color: var(--default-font-color); line-height: var(--default-line-height); } .button { box-sizing: border-box; display: flex; flex: none; order: 0; align-self: stretch; flex-grow: 0; flex-direction: column; align-items: flex-start; padding: 12px 16px; width: 213.5px; height: 64px; background-color: var(--button-background-color); border: var(--button-border); border-radius: var(--button-border-radius); transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; text-decoration: none !important; } .button:hover, .button:active, .button:focus { background-color: var(--button-background-color--hover); border: var(--button-border--hover); } .button__content { display: flex; align-items: flex-start; } .button__content .icon { height: 28px; width: 28px; } .button__title { font-family: 'Open Sans'; font-size: var(--button-title-font-size); line-height: 22px; letter-spacing: 0.15px; color: var(--button-title-color); } .button__description { font-family: 'Open Sans'; font-size: 12px; line-height: 18px; letter-spacing: 0.2px; color: var(--button-description-color); } `; export class Button extends HTMLElement { constructor () { super(); const shadow = this.attachShadow({ mode: 'open' }); const href = this.getAttribute('href'); const title = this.getAttribute('title'); const description = this.getAttribute('description'); const icon = this.getAttribute('icon') || null; shadow.innerHTML = `
${icon ? `` : null}
${title}
${description}
`; } } export default Button;