import React from 'react'; import ReactMarkdown from 'react-markdown'; interface Props { fullbredde?: boolean; tekst: string; suppress?: boolean; } function Formatering(props: Props) { const { fullbredde, tekst, suppress = false } = props; const options: { 'data-hj-suppress'?: boolean; } = { 'data-hj-suppress': suppress, }; if (!suppress) { delete options['data-hj-suppress']; } return (
{ if (props?.href?.startsWith('http')) { return ( {props.children} ); } return {props.children}; }, }} children={tekst} />
); } export { Formatering };