import { Cross } from '@opencrvs/components/lib/icons' ; import { ITheme } from '@opencrvs/components/lib/theme' ; import React from 'react' ; import styled , { withTheme } from 'styled-components' ; interface IProps { width : number ; crossClickHandler : ( ) => void ; title : React . ReactNode | string ; children : React . ReactNode ; theme : ITheme ; } const Window = styled . div < { width : number ; } > `
  position: fixed;
  top: 64px;
  right: 0;
  z-index: 1;
  height: 100%;
  width: ${ ( { width } ) => `${ width }px` };
  border: 1px solid ${ ( { theme } ) => theme . colors . dividerDark };
  color: ${ ( { theme } ) => theme . colors . copy };
  transition: all 0.03s;
  background-color: ${ ( { theme } ) => theme . colors . white };

  @media (max-width: ${ ( { theme } ) => theme . grid . breakpoints . lg }px) {
    width: 100%;
    top: 0px;
    z-index: 3;
  }
` ; const CrossButton = styled ( Cross ) `
  cursor: pointer;
` ; const TopBar = styled . div `
  height: 72px;
  display: flex;
  flex-direction: row;

  align-items: center;
  justify-content: space-between;
  padding: 0 12px;

  background-color: ${ ( { theme } ) => theme . colors . lightGreyBackground };
  @media (max-width: ${ ( { theme } ) => theme . grid . breakpoints . lg }px) {
    background-color: ${ ( { theme } ) => theme . colors . white };
  }
  border-bottom: 1px solid ${ ( { theme } ) => theme . colors . dividerDark };
` ; const Title = styled . div `` ; class ApplicationStatusWindowComponent extends React . Component < IProps > { render ( ) { return ( < Window id = "status-window" width = { this . props . width } > < TopBar > < Title > { this . props . title } < /Title> < CrossButton id = "btn-sts-wnd-cross" onClick = { this . props . crossClickHandler } / > < /TopBar> { this . props . children } < /Window>); } } export const ApplicationStatusWindow = withTheme ( ApplicationStatusWindowComponent ) ;