From 7c1aa489ada13f077cb03010bce5ecf623173a61 Mon Sep 17 00:00:00 2001 From: Derek Leadbetter Date: Fri, 8 Apr 2022 10:32:07 -0400 Subject: [PATCH] RC #121 - Removing highlighter selection from ViewXML component; Highlighter style must be passed as prop --- src/semantic-ui/ViewXML.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/semantic-ui/ViewXML.js b/src/semantic-ui/ViewXML.js index 7d060427..388dd331 100644 --- a/src/semantic-ui/ViewXML.js +++ b/src/semantic-ui/ViewXML.js @@ -2,12 +2,11 @@ import React, { type ComponentType, useState } from 'react'; import SyntaxHighlighter from 'react-syntax-highlighter'; -import * as styles from 'react-syntax-highlighter/dist/cjs/styles/hljs'; import { Button, Modal } from 'semantic-ui-react'; import i18n from '../i18n/i18n'; type Props = { - highlighter?: string, + highlighter?: any, opener: { component: ComponentType, props: any @@ -20,7 +19,6 @@ const ViewXML = (props: Props) => { const [showModal, setShowModal] = useState(false); const OpenerComponent = props.opener.component; const openerProps = props.opener.props; - const highlighter = styles[props.highlighter || 'atomOneLight']; return ( <> @@ -41,7 +39,7 @@ const ViewXML = (props: Props) => { { props.xml }