Change height of header programatically

Hello,

is there a easy way to change the height of the header programatically at runtime?

<ion-header [ngStyle]="getKeyboardStyle()" >

and on the component:

  getKeyboardStyle(height: number) {

      let style = {
        'top': height ? height + 'px' : '0px'
      }
      return style;
  
  }