Add markdown support, add bold to community title
This commit is contained in:
parent
22cac99675
commit
ad8b4343d3
5
app/package-lock.json
generated
5
app/package-lock.json
generated
@ -11148,6 +11148,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/mapnik-vector-tile/-/mapnik-vector-tile-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/mapnik-vector-tile/-/mapnik-vector-tile-3.0.1.tgz",
|
||||||
"integrity": "sha512-w3/mKA8RUODR4qeVUyU8MhSqeuHqCLhCPdekqb+FBo+SRPXgxYOvffQBcu8mhEu6EK1n1Syrq26FcNcLfkYLEw=="
|
"integrity": "sha512-w3/mKA8RUODR4qeVUyU8MhSqeuHqCLhCPdekqb+FBo+SRPXgxYOvffQBcu8mhEu6EK1n1Syrq26FcNcLfkYLEw=="
|
||||||
},
|
},
|
||||||
|
"markdown-to-jsx": {
|
||||||
|
"version": "7.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-7.1.3.tgz",
|
||||||
|
"integrity": "sha512-jtQ6VyT7rMT5tPV0g2EJakEnXLiPksnvlYtwQsVVZ611JsWGN8bQ1tVSDX4s6JllfEH6wmsYxNjTUAMrPmNA8w=="
|
||||||
|
},
|
||||||
"mdn-data": {
|
"mdn-data": {
|
||||||
"version": "2.0.4",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz",
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
"leaflet": "^1.7.1",
|
"leaflet": "^1.7.1",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"mapnik": "^4.5.8",
|
"mapnik": "^4.5.8",
|
||||||
|
"markdown-to-jsx": "^7.1.3",
|
||||||
"node-fs": "^0.1.7",
|
"node-fs": "^0.1.7",
|
||||||
"nodemailer": "^6.4.11",
|
"nodemailer": "^6.4.11",
|
||||||
"pg-format": "^1.0.4",
|
"pg-format": "^1.0.4",
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import Markdown from 'markdown-to-jsx';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import Tooltip from '../../components/tooltip';
|
import Tooltip from '../../components/tooltip';
|
||||||
@ -34,7 +35,9 @@ const DataTitleCopyable: React.FunctionComponent<DataTitleCopyableProps> = (prop
|
|||||||
<div className="data-title">
|
<div className="data-title">
|
||||||
<div className="data-title-text">
|
<div className="data-title-text">
|
||||||
<label htmlFor={`${props.slug}${props.slugModifier ?? ''}`}>
|
<label htmlFor={`${props.slug}${props.slugModifier ?? ''}`}>
|
||||||
|
<Markdown>
|
||||||
{ props.title }
|
{ props.title }
|
||||||
|
</Markdown>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div className="data-title-actions icon-buttons">
|
<div className="data-title-actions icon-buttons">
|
||||||
|
@ -3,6 +3,7 @@ import React, { Component } from 'react';
|
|||||||
import './tooltip.css';
|
import './tooltip.css';
|
||||||
|
|
||||||
import { InfoIcon } from './icons';
|
import { InfoIcon } from './icons';
|
||||||
|
import Markdown from 'markdown-to-jsx';
|
||||||
|
|
||||||
interface TooltipProps {
|
interface TooltipProps {
|
||||||
text: string;
|
text: string;
|
||||||
@ -79,7 +80,9 @@ class Tooltip extends Component<TooltipProps, TooltipState> {
|
|||||||
<div className="tooltip bs-tooltip-bottom">
|
<div className="tooltip bs-tooltip-bottom">
|
||||||
<div className="arrow"></div>
|
<div className="arrow"></div>
|
||||||
<div className="tooltip-inner">
|
<div className="tooltip-inner">
|
||||||
{tooltipTextToComponents(this.props.text)}
|
<Markdown>
|
||||||
|
{this.props.text}
|
||||||
|
</Markdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -85,7 +85,7 @@ export const buildingUserFields = {
|
|||||||
community_type_worth_keeping: {
|
community_type_worth_keeping: {
|
||||||
perUser: true,
|
perUser: true,
|
||||||
category: Category.Community,
|
category: Category.Community,
|
||||||
title: "Do you think this type of building is generally worth keeping?",
|
title: "Do you think this **type** of building is generally worth keeping?",
|
||||||
example: true,
|
example: true,
|
||||||
},
|
},
|
||||||
community_type_worth_keeping_reasons: {
|
community_type_worth_keeping_reasons: {
|
||||||
|
Loading…
Reference in New Issue
Block a user