feat(statuspage): refactor shared styles and modernize components for consistent theming, spacing and APIs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { DeesElement, property, html, customElement, type TemplateResult, css, cssManager, unsafeCSS } from '@design.estate/dees-element';
|
||||
import * as domtools from '@design.estate/dees-domtools';
|
||||
import { fonts } from '../styles/shared.styles.js';
|
||||
import * as sharedStyles from '../styles/shared.styles.js';
|
||||
import { demoFunc } from './upl-statuspage-pagetitle.demo.js';
|
||||
|
||||
declare global {
|
||||
@@ -14,13 +14,13 @@ export class UplStatuspagePagetitle extends DeesElement {
|
||||
public static demo = demoFunc;
|
||||
|
||||
@property({ type: String })
|
||||
public pageTitle: string = 'System Status';
|
||||
accessor pageTitle: string = 'System Status';
|
||||
|
||||
@property({ type: String })
|
||||
public pageSubtitle: string = '';
|
||||
@property({ type: String })
|
||||
accessor pageSubtitle: string = '';
|
||||
|
||||
@property({ type: Boolean })
|
||||
public centered: boolean = false;
|
||||
accessor centered: boolean = false;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
@@ -31,13 +31,13 @@ export class UplStatuspagePagetitle extends DeesElement {
|
||||
css`
|
||||
:host {
|
||||
display: block;
|
||||
font-family: ${unsafeCSS(fonts.base)};
|
||||
font-family: ${unsafeCSS(sharedStyles.fonts.base)};
|
||||
}
|
||||
|
||||
.title-container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 48px 24px 24px 24px;
|
||||
padding: ${unsafeCSS(sharedStyles.spacing.lg)};
|
||||
}
|
||||
|
||||
.title-container.centered {
|
||||
@@ -47,30 +47,30 @@ export class UplStatuspagePagetitle extends DeesElement {
|
||||
h1 {
|
||||
font-size: 48px;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.02em;
|
||||
letter-spacing: -0.03em;
|
||||
line-height: 1.1;
|
||||
color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
|
||||
margin: 0 0 16px 0;
|
||||
color: ${sharedStyles.colors.text.primary};
|
||||
margin: 0 0 ${unsafeCSS(sharedStyles.spacing.md)} 0;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 20px;
|
||||
color: ${cssManager.bdTheme('#6b7280', '#a1a1aa')};
|
||||
font-size: 18px;
|
||||
color: ${sharedStyles.colors.text.secondary};
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.title-container {
|
||||
padding: 32px 16px 20px 16px;
|
||||
padding: ${unsafeCSS(sharedStyles.spacing.lg)} ${unsafeCSS(sharedStyles.spacing.md)};
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 36px;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 18px;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user