Skip to content

Commit

Permalink
Detail viewer height (#187)
Browse files Browse the repository at this point in the history
Detail Viewer Height Adjustment
  • Loading branch information
rahuldsce authored Mar 26, 2020
1 parent e1ee618 commit b7b4c65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export const APP_INST = 'AppInst'
export const APP = 'App'
export const YES = 'YES'

export const getHeight = () => {
return window.innerHeight - 85
export const getHeight = (height) => {
return window.innerHeight - (height ? height : 85)
}

export const IPAccessLabel = (id) => {
Expand Down
3 changes: 2 additions & 1 deletion src/hoc/dataViewer/DetailViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import { Table } from 'semantic-ui-react'
import ReactJson from 'react-json-view';
import { Card } from '@material-ui/core';
import * as constant from '../../constant'

const jsonViewProps = {
name: null,
Expand Down Expand Up @@ -62,7 +63,7 @@ const getRow = (id, item, data) => {
const MexDetailViewer = (props) => {
let detailData = props.detailData;
return (
<Card style={{width:'100%', backgroundColor:'transparent', color:'white'}}>
<Card style={{width:'100%', backgroundColor:'transparent', color:'white', height:constant.getHeight(155)}}>
<Table celled style={{ width: '100%', backgroundColor: '#2A2C33', border: 'none'}}>
<Table.Header>
<Table.Row>
Expand Down

0 comments on commit b7b4c65

Please sign in to comment.