@grafana/ui
Version:
Grafana Components Library
52 lines (47 loc) • 1.22 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var react = require('@emotion/react');
;
function getMarkdownStyles(theme) {
return react.css({
".markdown-html": {
img: {
maxWidth: "100%"
},
"ul, ol": {
paddingLeft: theme.spacing(3),
marginBottom: theme.spacing(2)
},
table: {
marginBottom: theme.spacing(2),
"td, th": {
padding: theme.spacing(0.5, 1)
},
th: {
fontWeight: theme.typography.fontWeightMedium,
background: theme.colors.background.secondary
}
},
"table, th, td": {
border: `1px solid ${theme.colors.border.medium}`,
borderCollapse: "collapse"
},
a: {
color: theme.colors.text.link,
textDecoration: "none",
"&:hover": {
color: theme.colors.text.link,
textDecoration: "underline"
}
},
"p:last-child": {
marginBottom: 0
},
"table:last-child, ul:last-child, ol:last-child": {
marginBottom: 0
}
}
});
}
exports.getMarkdownStyles = getMarkdownStyles;
//# sourceMappingURL=markdownStyles.cjs.map