Skip to content

Commit

Permalink
1571: fix table height issue
Browse files Browse the repository at this point in the history
  • Loading branch information
f1sh1918 committed Aug 28, 2024
1 parent 12deb10 commit 31424f6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
3 changes: 3 additions & 0 deletions administration/src/bp-modules/ButtonBar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Card } from '@blueprintjs/core'
import styled from 'styled-components'

import dimensions from './constants/dimensions'

const ButtonBar = styled(Card)`
width: 100%;
padding: 15px;
Expand All @@ -12,6 +14,7 @@ const ButtonBar = styled(Card)`
& button {
margin: 5px;
}
height: ${dimensions.bottomBarHeight}px;
`

export default ButtonBar
2 changes: 2 additions & 0 deletions administration/src/bp-modules/NavigationBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ import { WhoAmIContext } from '../WhoAmIProvider'
import { Role } from '../generated/graphql'
import { ProjectConfigContext } from '../project-configs/ProjectConfigContext'
import UserMenu from './UserMenu'
import dimensions from './constants/dimensions'

const PrintAwareNavbar = styled(Navbar)`
@media print {
display: none;
}
height: ${dimensions.navigationBarHeight};
`

interface Props {
Expand Down
10 changes: 10 additions & 0 deletions administration/src/bp-modules/constants/dimensions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
type DimensionsType = {
navigationBarHeight: number
bottomBarHeight: number
}

const dimensions: DimensionsType = {
navigationBarHeight: 50,
bottomBarHeight: 70,
}
export default dimensions
4 changes: 2 additions & 2 deletions administration/src/bp-modules/stores/StoresTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { useCallback } from 'react'
import styled from 'styled-components'

import { StoreFieldConfig } from '../../project-configs/getProjectConfig'
import dimensions from '../constants/dimensions'
import { AcceptingStoreEntry } from './AcceptingStoreEntry'

const TableContainer = styled.div`
width: 100vw;
height: 85vh;
height: calc(100vh - ${dimensions.navigationBarHeight + dimensions.bottomBarHeight}px);
display: flex;
align-self: center;
`

const StyledCell = styled(Cell)`
Expand Down

0 comments on commit 31424f6

Please sign in to comment.