replace old client with new client from commafeed-ui repository

This commit is contained in:
Athou
2022-08-13 10:56:07 +02:00
parent ac7b6eeb21
commit 04894f118b
183 changed files with 20326 additions and 12678 deletions

View File

@@ -0,0 +1,30 @@
import { createStyles, Text } from "@mantine/core"
export interface ContentProps {
content: string
}
const useStyles = createStyles(theme => ({
content: {
// break long links or long words
overflowWrap: "anywhere",
"& a": {
color: theme.fn.variant({ color: theme.primaryColor, variant: "subtle" }).color,
},
"& img": {
maxWidth: "100%",
height: "auto",
},
"& iframe": {
maxWidth: "100%",
},
"& pre, & code": {
whiteSpace: "pre-wrap",
},
},
}))
export function Content(props: ContentProps) {
const { classes } = useStyles()
return <Text size="md" className={classes.content} dangerouslySetInnerHTML={{ __html: props.content }} />
}