Files
commafeed/commafeed-client/src/components/content/BasicHtmlStyles.tsx

25 lines
688 B
TypeScript
Raw Normal View History

import { TypographyStylesProvider } from "@mantine/core"
import type { ReactNode } from "react"
2024-10-21 21:51:46 +02:00
import { tss } from "tss"
/**
* This component is used to provide basic styles to html typography elements.
*
* see https://mantine.dev/core/typography-styles-provider/
*/
2024-10-21 21:51:46 +02:00
const useStyles = tss.create(() => ({
// override mantine default typography styles
content: {
paddingLeft: 0,
"& img": {
marginBottom: 0,
},
},
}))
export const BasicHtmlStyles = (props: { children: ReactNode }) => {
2024-10-21 21:51:46 +02:00
const { classes } = useStyles()
return <TypographyStylesProvider className={classes.content}>{props.children}</TypographyStylesProvider>
}