From c0e3cdcab53032e6282acba8b6c1051049107cfe Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Thu, 14 Sep 2023 16:00:34 +0200 Subject: [PATCH] Refactor the AuDateInput component We can now use the AuInput internally which removes the duplicated code. --- addon/components/au-date-input.hbs | 26 +++++++++++--------------- addon/components/au-date-input.js | 22 ---------------------- 2 files changed, 11 insertions(+), 37 deletions(-) diff --git a/addon/components/au-date-input.hbs b/addon/components/au-date-input.hbs index c32d85b2c..2fe2cffc7 100644 --- a/addon/components/au-date-input.hbs +++ b/addon/components/au-date-input.hbs @@ -1,15 +1,11 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/addon/components/au-date-input.js b/addon/components/au-date-input.js index fa3246fa8..5faab0c6f 100644 --- a/addon/components/au-date-input.js +++ b/addon/components/au-date-input.js @@ -11,28 +11,6 @@ import { export default class AuDateInputComponent extends Component { dateInput = DateInputModifier; - - // These getters need to be kept in sync with the AuInput component. - // Once we refactor that component so it no longer uses `` we can remove the duplication and wrap AuInput instead. - get width() { - if (this.args.width == 'block') return 'au-c-input--block'; - else return ''; - } - - get error() { - if (this.args.error) return 'au-c-input--error'; - else return ''; - } - - get warning() { - if (this.args.warning) return 'au-c-input--warning'; - else return ''; - } - - get disabled() { - if (this.args.disabled) return 'is-disabled'; - else return ''; - } } class DateInputModifier extends Modifier {