Skip to content

Commit

Permalink
remove image bottom margins (#1587)
Browse files Browse the repository at this point in the history
  • Loading branch information
Athou committed Oct 21, 2024
1 parent d5a3c81 commit 689e5c0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion commafeed-client/src/components/content/BasicHtmlStyles.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
import { TypographyStylesProvider } from "@mantine/core"
import type { ReactNode } from "react"
import { tss } from "tss"

/**
* This component is used to provide basic styles to html typography elements.
*
* see https://mantine.dev/core/typography-styles-provider/
*/

const useStyles = tss.create(() => ({
// override mantine default typography styles
content: {
paddingLeft: 0,
"& img": {
marginBottom: 0,
},
},
}))

export const BasicHtmlStyles = (props: { children: ReactNode }) => {
return <TypographyStylesProvider pl={0}>{props.children}</TypographyStylesProvider>
const { classes } = useStyles()
return <TypographyStylesProvider className={classes.content}>{props.children}</TypographyStylesProvider>
}

0 comments on commit 689e5c0

Please sign in to comment.