From b87a4a32e678adf17a8d266215843725b299a041 Mon Sep 17 00:00:00 2001 From: efux Date: Wed, 19 Jun 2019 18:29:32 +0200 Subject: [PATCH] feat(business/time-input): expose time input component for business applications (#33) --- .../src/lib/time-input/time-input.ts | 1 + .../angular-business/src/public-api.ts | 1 + .../src/styles/typography/_form.scss | 29 ++++++++++++------- 3 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 projects/sbb-esta/angular-business/src/lib/time-input/time-input.ts diff --git a/projects/sbb-esta/angular-business/src/lib/time-input/time-input.ts b/projects/sbb-esta/angular-business/src/lib/time-input/time-input.ts new file mode 100644 index 0000000000..dd0d890eea --- /dev/null +++ b/projects/sbb-esta/angular-business/src/lib/time-input/time-input.ts @@ -0,0 +1 @@ +export * from '../../../../angular-public/src/lib/time-input/time-input'; diff --git a/projects/sbb-esta/angular-business/src/public-api.ts b/projects/sbb-esta/angular-business/src/public-api.ts index 4315aeb2bd..1b2d306bda 100644 --- a/projects/sbb-esta/angular-business/src/public-api.ts +++ b/projects/sbb-esta/angular-business/src/public-api.ts @@ -2,3 +2,4 @@ * Public API Surface of angular-business */ export * from './lib/field/field'; +export * from './lib/time-input/time-input'; diff --git a/projects/sbb-esta/angular-public/src/styles/typography/_form.scss b/projects/sbb-esta/angular-public/src/styles/typography/_form.scss index 3f96c01967..7b20bce9c2 100644 --- a/projects/sbb-esta/angular-public/src/styles/typography/_form.scss +++ b/projects/sbb-esta/angular-public/src/styles/typography/_form.scss @@ -36,21 +36,30 @@ } @mixin timeInputBase { - $timeInputWidth: 70; - $timeInputHeight: 48; - width: toPx($timeInputWidth); - height: toPx($timeInputHeight); text-align: center; - @include mq($from: desktop4k) { - width: toPx($timeInputWidth * $scalingFactor4k); - height: toPx($timeInputWidth * $scalingFactor4k); + @include publicOnly() { + $timeInputWidth: 70; + $timeInputHeight: 48; + + width: toPx($timeInputWidth); + height: toPx($timeInputHeight); + + @include mq($from: desktop4k) { + width: toPx($timeInputWidth * $scalingFactor4k); + height: toPx($timeInputWidth * $scalingFactor4k); + } + + @include mq($from: desktop5k) { + width: toPx($timeInputWidth * $scalingFactor5k); + height: toPx($timeInputWidth * $scalingFactor5k); + } } - @include mq($from: desktop5k) { - width: toPx($timeInputWidth * $scalingFactor5k); - height: toPx($timeInputWidth * $scalingFactor5k); + @include businessOnly() { + width: 68px; + height: 36px; } }