Skip to content

Commit

Permalink
fix(addon-mobile): fix mobile-calendar size without header
Browse files Browse the repository at this point in the history
  • Loading branch information
MillerSvt committed Aug 1, 2024
1 parent 864e50e commit 038a560
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ import {
styleUrls: ['./mobile-calendar.style.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
providers: TUI_MOBILE_CALENDAR_PROVIDERS,
host: {'[class._ios]': 'isIOS', '[class._initialized]': 'initialized'},
host: {
'[class._ios]': 'isIOS',
'[class._initialized]': 'initialized',
'[class._without_header]': '!chooseDayOrRangeTexts$',
},
})
export class TuiMobileCalendarComponent implements AfterViewInit {
@ViewChild('yearsScrollRef')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@
@background: var(--tui-base-01);

:host {
--tui-mobile-calendar-header-height: 3.5rem;
display: block;
height: 100%;
font-family: -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
color: var(--tui-text-01);
-webkit-tap-highlight-color: transparent;
}

:host(._without_header) {
--tui-mobile-calendar-header-height: 0rem;
}

.t-header {
position: relative;
display: flex;
Expand Down Expand Up @@ -164,7 +169,7 @@

.t-months {
.scrollbar-hidden();
height: ~'calc(100% - 9.5rem)';
height: ~'calc(100% - 6rem - var(--tui-mobile-calendar-header-height))';
box-shadow: 0 -1px @border;
overflow-x: hidden;

Expand Down

0 comments on commit 038a560

Please sign in to comment.