import * as React from 'react' ; export class SplitLayoutRight extends React . PureComponent < IProps , any > { constructor ( props , context ) { super ( props , context ) ; } public render ( ) { let margins = { bottom : 'auto' , top : undefined } ; if ( this . props . verticalAlign === 'middle' ) { margins = { bottom : 'auto' , top : 'auto' } ; } return ( < div className = "split-layout-right" style = { { marginBottom : margins . bottom , marginTop : margins . top , marginLeft : 'auto' , display : 'flex' , justifyContent : 'flex-end' , verticalAlign : this . props . verticalAlign || 'top' } } > { this . props . children } < /div>); } } interface IProps { readonly verticalAlign ? : 'top' | 'middle' ; } interface Margins { bottom : 'auto' | undefined ; top : 'auto' | undefined ; }