-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: integrate kennisartikel-category into overige api
- Loading branch information
1 parent
adf008a
commit 9096c3d
Showing
15 changed files
with
804 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
apps/overige-objecten-api/src/components/AccordionSection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react'; | ||
import { Markdown } from './Markdown'; | ||
|
||
export interface AccordionSectionProps { | ||
label: string; | ||
body: string; | ||
headingLevel: number; | ||
} | ||
export const AccordionSection = ({ body, headingLevel = 2, label }: AccordionSectionProps) => { | ||
const CustomHeading = `h${headingLevel}` as keyof React.JSX.IntrinsicElements; | ||
return ( | ||
<div> | ||
<CustomHeading>{label}</CustomHeading> | ||
<Markdown>{body}</Markdown> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from 'react'; | ||
import xss from 'xss'; | ||
|
||
export const Markdown = ({ children }: { children: string }) => | ||
children ? <div dangerouslySetInnerHTML={{ __html: xss(children) }} /> : null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.