Album details UI fix (#922)

* Fix the Album Details UI to look similar to Song Details UI

* Remove the unused components

* Fix the gap between row and the first field in the details view

* Fix the width of the row of Album Details UI
This commit is contained in:
rochakjain361
2021-04-02 08:33:05 +05:30
committed by GitHub
parent 0d95c4bb9d
commit d0d18e8512
2 changed files with 60 additions and 13 deletions
+13 -1
View File
@@ -9,8 +9,16 @@ import { BooleanField, DateField, TextField, useTranslate } from 'react-admin'
import inflection from 'inflection'
import { BitrateField, SizeField } from './index'
import { MultiLineTextField } from './MultiLineTextField'
import { makeStyles } from '@material-ui/core/styles'
const useStyles = makeStyles({
tableCell: {
width: '17.5%',
},
})
export const SongDetails = (props) => {
const classes = useStyles()
const translate = useTranslate()
const { record } = props
const data = {
@@ -42,7 +50,11 @@ export const SongDetails = (props) => {
{Object.keys(data).map((key) => {
return (
<TableRow key={`${record.id}-${key}`}>
<TableCell component="th" scope="row">
<TableCell
component="th"
scope="row"
className={classes.tableCell}
>
{translate(`resources.song.fields.${key}`, {
_: inflection.humanize(inflection.underscore(key)),
})}