Skip to content

Commit f4ed0e4

Browse files
committed
feat(duration): allow overriding defaults; use placeholder vs supporting text
1 parent 738c95e commit f4ed0e4

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

packages/web/titanium/duration-input/duration-input.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ export class TitaniumDurationInput extends ExtendableOutlinedTextField {
2929

3030
@property({ reflect: true, type: Boolean }) accessor spellcheck: boolean = false;
3131

32-
firstUpdated() {
33-
this.label = 'Duration';
34-
this.supportingText = 'Enter a duration ex. "3 hours and 30 minutes"';
32+
@property({ reflect: true, type: String }) accessor placeholder: string = '3 hours and 30 minutes';
33+
@property({ reflect: true, type: String }) accessor label: string = 'Duration';
3534

35+
firstUpdated() {
3636
this.addEventListener('change', () => {
3737
this.#customReportValidity(this.input.value);
3838

packages/web/titanium/duration-input/filled-duration-input.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ export class TitaniumFilledDurationInput extends MdFilledTextField {
2424
* want to work with. When changed a duration-change event will be dispatched.
2525
*/
2626
@property({ type: Object }) accessor duration: duration.Duration | null = null;
27-
@property({ type: String }) label: string = 'Duration';
28-
@property({ type: String }) supportingText: string = 'Enter a duration ex. "3 hours and 30 minutes"';
29-
@property({ type: String }) autocomplete: string = 'off';
27+
@property({ type: String }) label: string = 'Duration';
28+
@property({ type: String }) placeholder: string = '3 hours and 30 minutes';
29+
@property({ type: String }) autocomplete: string = 'off';
3030
@property({ type: Boolean }) spellcheck: boolean = false;
3131

3232
updated(changedProps: PropertyValues<this>) {

0 commit comments

Comments
 (0)