-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TermView with variations and rich text definition
- Loading branch information
Showing
3 changed files
with
29 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
import { Container } from 'semantic-ui-react'; | ||
|
||
const TermView = ({ content }) => { | ||
return ( | ||
<Container className="view-wrapper"> | ||
<article id="content"> | ||
<header> | ||
<h1 className="documentFirstHeading">{content.title}</h1> | ||
</header> | ||
<section id="content-core"> | ||
{content.variations && | ||
content.variations.map((el) => <div key={el}>{el}</div>)} | ||
{content.definition && ( | ||
<p | ||
dangerouslySetInnerHTML={{ | ||
__html: content.definition.data || content.description, | ||
}} | ||
/> | ||
)} | ||
</section> | ||
</article> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default TermView; |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import Tooltips from './Tooltips'; | ||
import GlossaryView from './GlossaryView'; | ||
|
||
import './glossarytooltips.less'; | ||
|
||
|
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