Skip to content

Commit

Permalink
released v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jun 19, 2023
1 parent 60a9525 commit 77ac14c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default function Demo() {

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

```tsx mdx:preview
```tsx mdx:preview:&title=Online Editing Theme
import React, { useState, useRef } from 'react';
import Colorful from '@uiw/react-color-colorful';
import JsonView from '@uiw/react-json-view';
Expand Down
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@uiw/react-json-view",
"version": "0.1.0",
"version": "1.0.0",
"description": "JSON viewer for react.",
"main": "cjs/index.js",
"module": "esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.0",
"version": "1.0.0",
"packages": [
"core",
"www"
Expand Down
4 changes: 2 additions & 2 deletions www/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "website",
"version": "0.1.0",
"version": "1.0.0",
"preview": true,
"scripts": {
"build": "kkt build",
Expand All @@ -11,7 +11,7 @@
"@uiw/react-back-to-top": "1.2.3",
"@uiw/react-color-colorful": "^1.3.1",
"@uiw/react-github-corners": "^1.5.15",
"@uiw/react-json-view": "0.1.0",
"@uiw/react-json-view": "1.0.0",
"@uiw/react-markdown-preview": "^4.1.0",
"@wcj/dark-mode": "^1.0.13",
"react": "^18.2.0",
Expand Down
5 changes: 3 additions & 2 deletions www/src/Markdown.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import CodeLayout from 'react-code-preview-layout';
import { getMetaId, isMeta } from 'markdown-react-code-preview-loader';
import { getMetaId, isMeta, getURLParameters } from 'markdown-react-code-preview-loader';
import MarkdownPreview from '@uiw/react-markdown-preview';
import styled from 'styled-components';
import rehypeIgnore from 'rehype-ignore';
Expand Down Expand Up @@ -31,12 +31,13 @@ const CodePreview: CodeComponent | ReactMarkdownNames = ({ inline, node, ...prop
const Child = data.components[`${metaId}`];
if (metaId && typeof Child === 'function') {
const code = data.data[metaId].value || '';
const { title } = getURLParameters(meta);
return (
<CodeLayout>
<Preview>
<Child />
</Preview>
<Toolbar text={code}>Code Example</Toolbar>
<Toolbar text={code}>{title || 'Code Example'}</Toolbar>
<Code>
<code {...rest} />
</Code>
Expand Down

0 comments on commit 77ac14c

Please sign in to comment.