PluginDetails: Fix usage list height (#79695)

This commit is contained in:
Alex Khomenko 2024-01-04 15:42:28 +02:00 committed by GitHub
parent a349ef6c0b
commit 0844b87b2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 54 deletions

View File

@ -4040,9 +4040,7 @@ exports[`better eslint`] = {
[0, 0, 0, "Styles should be written using objects.", "0"]
],
"public/app/features/plugins/admin/components/PluginDetailsBody.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Styles should be written using objects.", "1"],
[0, 0, 0, "Styles should be written using objects.", "2"]
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/plugins/admin/components/PluginDetailsHeaderDependencies.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"],

View File

@ -131,55 +131,44 @@ export function PluginDetailsBody({ plugin, queryParams, pageId }: Props): JSX.E
}
export const getStyles = (theme: GrafanaTheme2) => ({
container: css``,
readme: css`
& img {
max-width: 100%;
}
h1,
h2,
h3 {
margin-top: ${theme.spacing(3)};
margin-bottom: ${theme.spacing(2)};
}
*:first-child {
margin-top: 0;
}
li {
margin-left: ${theme.spacing(2)};
& > p {
margin: ${theme.spacing()} 0;
}
}
a {
color: ${theme.colors.text.link};
&:hover {
color: ${theme.colors.text.link};
text-decoration: underline;
}
}
table {
table-layout: fixed;
width: 100%;
td,
th {
overflow-x: auto;
padding: ${theme.spacing(0.5)} ${theme.spacing(1)};
}
table,
th,
td {
border: 1px solid ${theme.colors.border.medium};
border-collapse: collapse;
}
}
`,
container: css({
height: '100%',
}),
readme: css({
'& img': {
maxWidth: '100%',
},
'h1, h2, h3': {
marginTop: theme.spacing(3),
marginBottom: theme.spacing(2),
},
'*:first-child': {
marginTop: 0,
},
li: {
marginLeft: theme.spacing(2),
'& > p': {
margin: theme.spacing(1, 0),
},
},
a: {
color: theme.colors.text.link,
'&:hover': {
color: theme.colors.text.link,
textDecoration: 'underline',
},
},
table: {
tableLayout: 'fixed',
width: '100%',
'td, th': {
overflowX: 'auto',
padding: theme.spacing(0.5, 1),
},
'table, th, td': {
border: `1px solid ${theme.colors.border.medium}`,
borderCollapse: 'collapse',
},
},
}),
});