Skip to content

Commit

Permalink
Merge pull request #676 from barbalex/mui6
Browse files Browse the repository at this point in the history
Mui6
  • Loading branch information
barbalex authored Aug 27, 2024
2 parents 5a8cd1b + adc84ea commit bf6b594
Show file tree
Hide file tree
Showing 9 changed files with 125 additions and 89 deletions.
146 changes: 80 additions & 66 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@fontsource/roboto": "5.0.14",
"@fontsource/roboto-mono": "5.0.19",
"@json2csv/plainjs": "7.0.6",
"@mui/material": "5.16.7",
"@mui/material": "6.0.0",
"@react-leaflet/core": "2.1.0",
"@tanstack/react-query": "5.52.2",
"@turf/ellipse": "7.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Docs/Sidebar/MenuItems.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import styled from '@emotion/styled'
import MenuItem from './MenuItem.jsx'
import storeContext from '../../../storeContext.js'

// dont know why but divider is too thick,
// don't know why but divider is too thick,
// thicker than ListItemButton divider
const StyledDivider = styled(Divider)`
height: unset !important;
Expand Down
11 changes: 6 additions & 5 deletions src/components/EkPlan/Choose.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const CheckboxDensifier = styled.div`
margin: -8px 2px -8px -4px;
`

// placing mateiral-ui checkboxes denser
// placing material-ui checkboxes denser
// see: https://github.com/mui-org/material-ui/issues/6098#issuecomment-380451242
// but styling with styled-components
const DenserCheckbox = (props) => (
Expand Down Expand Up @@ -154,9 +154,7 @@ const EkPlanChoose = () => {
onBlur={onBlurPastYears}
size="small"
type="number"
InputLabelProps={{
shrink: true,
}}
slotProps={{ inputLabel: { shrink: true } }}
/>
</PastYearsContainer>
<FelderButton
Expand Down Expand Up @@ -242,7 +240,10 @@ const EkPlanChoose = () => {
<DialogTitle id="alert-dialog-title">{'Felder wählen:'}</DialogTitle>
<Fields />
<DialogActions>
<Button onClick={closeFieldsDialog} color="inherit">
<Button
onClick={closeFieldsDialog}
color="inherit"
>
schliessen
</Button>
</DialogActions>
Expand Down
16 changes: 11 additions & 5 deletions src/components/EkPlan/Table/CellForYearMenu/EkfsMenu/Ekf.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useState, useCallback } from 'react'
import List from '@mui/material/List'
import ListItem from '@mui/material/ListItem'
import ListItemButton from '@mui/material/ListItemButton'
import ListItemText from '@mui/material/ListItemText'
import Collapse from '@mui/material/Collapse'
import {
Expand Down Expand Up @@ -28,7 +29,12 @@ const StyledListItemText = styled(ListItemText)`
font-size: 0.85rem !important;
}
`
const SyledListItem = styled(ListItem)`
const StyledListItem = styled(ListItem)`
padding-top: 0 !important;
padding-bottom: 0 !important;
font-size: 0.85rem !important;
`
const StyledListItemButton = styled(ListItemButton)`
padding-top: 0 !important;
padding-bottom: 0 !important;
font-size: 0.85rem !important;
Expand Down Expand Up @@ -60,7 +66,7 @@ const EkfMenu = ({ tpop, ekf, border }) => {

return (
<OuterList component="nav" border={border.toString()}>
<SyledListItem button onClick={toggleOpen}>
<ListItemButton onClick={toggleOpen}>
<StyledListItemText primary={title} />
<OutsideLink
onClick={() => {
Expand All @@ -74,7 +80,7 @@ const EkfMenu = ({ tpop, ekf, border }) => {
<FaExternalLinkAlt />
</OutsideLink>
{open ? <CloseIcon /> : <ExpandIcon />}
</SyledListItem>
</ListItemButton>
<Collapse in={open} timeout="auto" unmountOnExit>
<InnerList>
{zaehls.map((z) => {
Expand All @@ -86,9 +92,9 @@ const EkfMenu = ({ tpop, ekf, border }) => {
z.anzahl !== null ? z.anzahl : '(Anzahl nicht erfasst)'

return (
<SyledListItem key={z.id} component="div">
<StyledListItem key={z.id} component="div">
{`${anzahl} ${einheit}, ${methode}`}
</SyledListItem>
</StyledListItem>
)
})}
</InnerList>
Expand Down
Loading

0 comments on commit bf6b594

Please sign in to comment.