diff --git a/README.md b/README.md index 2e2faaa..7da3383 100644 --- a/README.md +++ b/README.md @@ -66,9 +66,9 @@ hide: | Name | Default | Description | | ------------------------------- | --------------------------- | ------------------------------------------- | -| --tpc-elements-background-color | `var(--dark-primary-color)` | Background colro for header and ui elements | +| --tpc-elements-background-color | `var(--dark-primary-color)` | Background color for header and ui elements | | --tpc-icon-color | `var(--primary-text-color)` | Arrow color | -| --tpc-text-color | `var(--primary-text-color)` | Text color | +| --tpc-text-color | `white` | Text color | | --tpc-accent-color | `var(--accent-color)` | AM / PM active color | ## Meta diff --git a/examples/custom.png b/examples/custom.png index 8d47f63..70cf00f 100644 Binary files a/examples/custom.png and b/examples/custom.png differ diff --git a/examples/default_with_name.png b/examples/default_with_name.png index 87256b2..6126c74 100644 Binary files a/examples/default_with_name.png and b/examples/default_with_name.png differ diff --git a/examples/default_without_name.png b/examples/default_without_name.png index 06c8572..ca88d26 100644 Binary files a/examples/default_without_name.png and b/examples/default_without_name.png differ diff --git a/src/components/time-period.component.ts b/src/components/time-period.component.ts index 71195b0..99cb8dc 100644 --- a/src/components/time-period.component.ts +++ b/src/components/time-period.component.ts @@ -16,8 +16,16 @@ export class TimePeriodComponent extends LitElement { @property() private period!: Period; + private get amClass(): ClassInfo { + return { 'time-period': true, active: this.period === Period.AM }; + } + + private get pmClass(): ClassInfo { + return { 'time-period': true, active: this.period === Period.PM }; + } + render(): TemplateResult { - return html`
+ return html`
AM
@@ -32,14 +40,6 @@ export class TimePeriodComponent extends LitElement { this.dispatchEvent(event); } - private get amClass(): ClassInfo { - return { 'time-period': true, active: this.period === Period.AM }; - } - - private get pmClass(): ClassInfo { - return { 'time-period': true, active: this.period === Period.PM }; - } - static get styles(): CSSResult { return css` .time-period-selector { diff --git a/src/components/time-unit.component.ts b/src/components/time-unit.component.ts index 4688118..0bbcd12 100644 --- a/src/components/time-unit.component.ts +++ b/src/components/time-unit.component.ts @@ -52,7 +52,7 @@ export class TimeUnitComponent extends LitElement { private renderStepChanger(direction: Direction): TemplateResult { return html`
this.onStepChangerClick(direction)}> - +
`; diff --git a/src/time-picker-card.ts b/src/time-picker-card.ts index 732a38b..4af0471 100644 --- a/src/time-picker-card.ts +++ b/src/time-picker-card.ts @@ -134,13 +134,13 @@ export class TimePickerCard extends LitElement { ); --tpc-icon-color: var(--time-picker-icon-color, var(--primary-text-color)); - --tpc-text-color: var(--time-picker-text-color, var(--primary-text-color)); + --tpc-text-color: var(--time-picker-text-color, #fff); --tpc-accent-color: var(--time-picker-accent-color, var(--accent-color)); } .time-picker-header { padding: 16px; - color: var(--tpc-text-color, #fff); + color: var(--tpc-text-color); background-color: var(--tpc-elements-background-color); font-size: 1em; text-align: center;