Skip to content

Commit

Permalink
Album size overflow fixed (#1071)
Browse files Browse the repository at this point in the history
* Added back button

* Added back button

* Added back button

* Fixed Album size overflow

* Fixed Album size overflow

* Fixed album size overflowing

* Fixed album size overflowing

* Fixed album size overflowing

* Fixed album size overflow on small screen

* Changes reverted in PlayerEdit.js

* prettier formatting issue resolved

Co-authored-by: Deluan <deluan@navidrome.org>
  • Loading branch information
Salman-Inayat and deluan committed Sep 9, 2021
1 parent 6ac2fef commit 06b1a1a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ui/src/common/SizeField.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@ import React from 'react'
import PropTypes from 'prop-types'
import { formatBytes } from '../utils'
import { useRecordContext } from 'react-admin'
import { makeStyles } from '@material-ui/core'

const useStyles = makeStyles((theme) => ({
root: {
display: 'inline-block',
},
}))

export const SizeField = ({ source, ...rest }) => {
const classes = useStyles()
const record = useRecordContext(rest)
return <span>{formatBytes(record[source])}</span>
return <span className={classes.root}>{formatBytes(record[source])}</span>
}

SizeField.propTypes = {
Expand Down

0 comments on commit 06b1a1a

Please sign in to comment.