UNPKG

@atlaskit/editor-wikimarkup-transformer

Version:

Wiki markup transformer for JIRA and Confluence

21 lines 481 B
import { textColor } from '../marks/color'; const color = { grey: '#97A0AF', purple: '#6554C0', blue: '#00B8D9', red: '#FF5630', yellow: '#FF991F', green: '#36B37E' }; export const status = node => { const text = `*[ ${node.attrs.text.toUpperCase()} ]*`; const newAttrs = { ...node.attrs }; if (color[node.attrs.color]) { newAttrs.color = color[node.attrs.color]; } else { newAttrs.color = color['grey']; } return textColor(text, newAttrs); };