@woosmap/ui 4.210.0 → 4.211.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@woosmap/ui",
3
- "version": "4.210.0",
3
+ "version": "4.211.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/WebGeoServices/ui.git"
@@ -5,6 +5,10 @@ import js from 'react-syntax-highlighter/dist/cjs/languages/hljs/javascript';
5
5
  import shell from 'react-syntax-highlighter/dist/cjs/languages/hljs/powershell';
6
6
  import json from 'react-syntax-highlighter/dist/cjs/languages/hljs/json';
7
7
  import github from 'react-syntax-highlighter/dist/cjs/styles/hljs/github';
8
+ // import dark from 'react-syntax-highlighter/dist/cjs/styles/hljs/nnfx-dark';
9
+ import dark from 'react-syntax-highlighter/dist/cjs/styles/hljs/night-owl';
10
+ // import dark from 'react-syntax-highlighter/dist/cjs/styles/hljs/gml';
11
+ // import dark from 'react-syntax-highlighter/dist/cjs/styles/hljs/dracula';
8
12
 
9
13
  SyntaxHighlighter.registerLanguage('javascript', js);
10
14
  SyntaxHighlighter.registerLanguage('bash', shell);
@@ -17,9 +21,9 @@ export default class CodeSnippet extends Component {
17
21
  }
18
22
 
19
23
  render() {
20
- const { codeString, language, className } = this.props;
24
+ const { codeString, language, className, isDark } = this.props;
21
25
  return (
22
- <SyntaxHighlighter className={className} language={language} style={github}>
26
+ <SyntaxHighlighter className={className} language={language} style={isDark ? dark : github}>
23
27
  {codeString}
24
28
  </SyntaxHighlighter>
25
29
  );
@@ -29,9 +33,11 @@ export default class CodeSnippet extends Component {
29
33
  CodeSnippet.defaultProps = {
30
34
  codeString: '',
31
35
  className: '',
36
+ isDark: false,
32
37
  };
33
38
  CodeSnippet.propTypes = {
34
39
  codeString: PropTypes.string,
35
40
  className: PropTypes.string,
41
+ isDark: PropTypes.bool,
36
42
  language: PropTypes.string.isRequired,
37
43
  };
@@ -423,12 +423,17 @@ export default class AutocompleteAddressDemo extends Component {
423
423
  <div className="showcase-result-bg">
424
424
  <div className="showcase-result-request">
425
425
  <h4>{tr('Request')}</h4>
426
- <CodeSnippet language="bash" codeString={this.renderCurlCode()} />
426
+ <CodeSnippet
427
+ language="bash"
428
+ isDark
429
+ codeString={this.renderCurlCode()}
430
+ />
427
431
  </div>
428
432
  {!error && selectedLocality && (
429
433
  <div className="showcase-result-response">
430
434
  <h4>{tr(' Response')}</h4>
431
435
  <CodeSnippet
436
+ isDark
432
437
  language="json"
433
438
  codeString={JSON.stringify(selectedLocality, null, 2)}
434
439
  />