Skip to content

Commit 77ac14c

Browse files
committed
released v1.0.0
1 parent 60a9525 commit 77ac14c

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

core/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export default function Demo() {
138138

139139
Online custom style example, please check in the [documentation website](https://uiwjs.github.io/react-json-view/)
140140

141-
```tsx mdx:preview
141+
```tsx mdx:preview:&title=Online Editing Theme
142142
import React, { useState, useRef } from 'react';
143143
import Colorful from '@uiw/react-color-colorful';
144144
import JsonView from '@uiw/react-json-view';

core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uiw/react-json-view",
3-
"version": "0.1.0",
3+
"version": "1.0.0",
44
"description": "JSON viewer for react.",
55
"main": "cjs/index.js",
66
"module": "esm/index.js",

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.1.0",
2+
"version": "1.0.0",
33
"packages": [
44
"core",
55
"www"

www/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "website",
3-
"version": "0.1.0",
3+
"version": "1.0.0",
44
"preview": true,
55
"scripts": {
66
"build": "kkt build",
@@ -11,7 +11,7 @@
1111
"@uiw/react-back-to-top": "1.2.3",
1212
"@uiw/react-color-colorful": "^1.3.1",
1313
"@uiw/react-github-corners": "^1.5.15",
14-
"@uiw/react-json-view": "0.1.0",
14+
"@uiw/react-json-view": "1.0.0",
1515
"@uiw/react-markdown-preview": "^4.1.0",
1616
"@wcj/dark-mode": "^1.0.13",
1717
"react": "^18.2.0",

www/src/Markdown.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import CodeLayout from 'react-code-preview-layout';
2-
import { getMetaId, isMeta } from 'markdown-react-code-preview-loader';
2+
import { getMetaId, isMeta, getURLParameters } from 'markdown-react-code-preview-loader';
33
import MarkdownPreview from '@uiw/react-markdown-preview';
44
import styled from 'styled-components';
55
import rehypeIgnore from 'rehype-ignore';
@@ -31,12 +31,13 @@ const CodePreview: CodeComponent | ReactMarkdownNames = ({ inline, node, ...prop
3131
const Child = data.components[`${metaId}`];
3232
if (metaId && typeof Child === 'function') {
3333
const code = data.data[metaId].value || '';
34+
const { title } = getURLParameters(meta);
3435
return (
3536
<CodeLayout>
3637
<Preview>
3738
<Child />
3839
</Preview>
39-
<Toolbar text={code}>Code Example</Toolbar>
40+
<Toolbar text={code}>{title || 'Code Example'}</Toolbar>
4041
<Code>
4142
<code {...rest} />
4243
</Code>

0 commit comments

Comments
 (0)