Skip to content

Commit 25bc0fc

Browse files
BrianWalterscarbonrobot
authored andcommitted
Update documentation site links and branding
1 parent 4a21fd4 commit 25bc0fc

36 files changed

+749
-240
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<p align="center">
2-
<a href="https://formidable.com/open-source/" target="_blank">
3-
<img alt="React Live — Formidable, We build the modern web" src="https://raw.githubusercontent.com/FormidableLabs/react-live/master/react-live-Hero.png" />
2+
<a href="https://commerce.nearform.com/open-source/" target="_blank">
3+
<img alt="React Live — Formidable, We build the modern web" src="https://oss.nearform.com/api/banner.svg?text=react+live" />
44
</a>
55
</p>
66
<p align="center">
77
<strong>A flexible playground for live editing React code</strong>
88
<br><br>
99
<a href="https://npmjs.com/package/react-live"><img src="https://img.shields.io/npm/dm/react-live.svg"></a>
1010
<a href="https://npmjs.com/package/react-live"><img src="https://img.shields.io/npm/v/react-live.svg"></a>
11-
<img src="https://img.badgesize.io/https://unpkg.com/react-live/dist/react-live.min.js?compression=gzip&label=gzip%20size">
1211
<img src="https://img.badgesize.io/https://unpkg.com/react-live/dist/react-live.min.js?label=size">
1312
<img src="https://img.shields.io/badge/module%20formats-umd%2C%20cjs%2C%20esm-green.svg">
1413
<a href="https://github.com/FormidableLabs/react-live#maintenance-status">
@@ -22,7 +21,7 @@ The library is structured modularly and lets you style and compose its component
2221

2322
<p align="center"><img src="https://user-images.githubusercontent.com/17658189/63181897-1d67d380-c049-11e9-9dd2-7da2a3a57f05.gif" width=500></p>
2423

25-
Come learn more at our [docs site](https://formidable.com/open-source/react-live)!
24+
Come learn more at our [docs site](https://commerce.nearform.com/open-source/react-live)!
2625

2726
## Support
2827

docs/introduction.mdx

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import { DemoLiveEditor } from "../website/src/components/live-edit";
77

88
# Introduction
99

10-
[![React Live — Formidable, We build the modern web](https://raw.githubusercontent.com/FormidableLabs/react-live/master/react-live-Hero.png)](https://formidable.com/open-source/)
11-
1210
**React Live** brings you the ability to render React components with editable source code and live preview. React Live is structured modularly and lets you style and compose its components freely. The following demos show typical use cases including the editor, preview, and error pane components.
1311

1412
To see React Live in action, make changes to the following editor panes:
@@ -30,6 +28,17 @@ export const jsxExample = `
3028

3129
<DemoLiveEditor code={jsxExample} />
3230

31+
```jsx
32+
import { LiveProvider, LiveEditor, LivePreview } from "react-live";
33+
34+
<LiveProvider code={code}>
35+
<div className="grid grid-cols-2 gap-4">
36+
<LiveEditor className="font-mono" />
37+
<LivePreview />
38+
</div>
39+
</LiveProvider>
40+
```
41+
3342
### Render-function Demo
3443

3544
To render a series of components or render components beyond just JSX, React Live also provides a `render` function to pass JSX into when the `noInline` prop is present. This lets you render multiple or functional components with hooks. This example shows a functional component with a `useState` hook.
@@ -65,6 +74,17 @@ render(<Counter label="Counter" />)
6574

6675
<DemoLiveEditor code={noInlineExample} noInline />
6776

77+
```jsx
78+
import { LiveProvider, LiveEditor, LivePreview } from "react-live";
79+
80+
<LiveProvider code={code} noInline>
81+
<div className="grid grid-cols-2 gap-4">
82+
<LiveEditor className="font-mono" />
83+
<LivePreview />
84+
</div>
85+
</LiveProvider>
86+
```
87+
6888
### Syntax Error Demo
6989

7090
React Live can also display customizable errors when your code contains errors.
@@ -74,3 +94,15 @@ const badVariable = ;
7494
`.trim();
7595

7696
<DemoLiveEditor code={syntaxError} />
97+
98+
```jsx
99+
import { LiveProvider, LiveEditor, LivePreview, LiveError } from "react-live";
100+
101+
<LiveProvider code={code}>
102+
<div className="grid grid-cols-2 gap-4">
103+
<LiveEditor className="font-mono" />
104+
<LivePreview />
105+
<LiveError className="text-red-800 bg-red-100 mt-2" />
106+
</div>
107+
</LiveProvider>
108+
```

pnpm-lock.yaml

Lines changed: 221 additions & 96 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

react-live-Hero.png

-505 KB
Binary file not shown.

website/docusaurus.config.js

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,11 @@ const { themes } = require("prism-react-renderer");
88
const config = {
99
title: "React Live",
1010
tagline: "A flexible playground for live editing React components",
11-
url: "https://formidable.com",
12-
baseUrl:
13-
process.env.VERCEL_ENV === "preview" ? "/" : "/open-source/react-live",
11+
url: "https://commerce.nearform.com",
12+
baseUrl: "/open-source/react-live",
1413
onBrokenLinks: "throw",
1514
onBrokenMarkdownLinks: "warn",
16-
favicon: "img/favicon.ico",
17-
18-
// GitHub pages deployment config.
19-
// If you aren't using GitHub pages, you don't need these.
20-
organizationName: "Formidable",
21-
projectName: "react-live", // Usually your repo name.
15+
favicon: "img/nearform-icon.svg",
2216

2317
// Even if you don't use internalization, you can use this field to set useful
2418
// metadata like html lang. For example, if your site is Chinese, you may want
@@ -34,7 +28,7 @@ const config = {
3428
/** @type {import('@docusaurus/preset-classic').Options} */
3529
({
3630
docs: {
37-
routeBasePath: "/",
31+
routeBasePath: "/docs",
3832
path: "../docs",
3933
sidebarPath: require.resolve("./sidebars.js"),
4034
editUrl:
@@ -67,27 +61,28 @@ const config = {
6761
navbar: {
6862
title: "React Live",
6963
logo: {
70-
alt: "Formidable logo",
71-
src: "img/formidable-f.svg",
64+
alt: "Nearform",
65+
src: "/img/nearform-logo-white.svg",
7266
},
7367
items: [
68+
{ to: "docs", label: "Documentation", position: "left" },
7469
{
7570
href: "https://github.com/FormidableLabs/react-live",
7671
className: "header-github-link",
7772
"aria-label": "GitHub Repository",
7873
position: "right",
7974
},
80-
{
81-
href: "https://formidable.com",
82-
className: "header-formidable-link",
83-
"aria-label": "Formidable Website",
84-
position: "right",
85-
},
8675
],
8776
},
8877
footer: {
89-
style: "dark",
90-
copyright: `Copyright © ${new Date().getFullYear()} Formidable`,
78+
logo: {
79+
alt: "Nearform logo",
80+
src: "img/nearform-logo-white.svg",
81+
href: "https://nearform.com",
82+
width: 100,
83+
height: 100,
84+
},
85+
copyright: `Copyright © 2013-${new Date().getFullYear()} Nearform`,
9186
},
9287
prism: {
9388
theme: themes.nightOwlLight,

website/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"@docusaurus/module-type-aliases": "2.4.0",
3535
"@docusaurus/types": "^2.4.0",
3636
"@tsconfig/docusaurus": "^1.0.5",
37+
"formidable-oss-badges": "^1.3.2",
3738
"typescript": "^4.7.4"
3839
},
3940
"browserslist": {
45.6 KB
Binary file not shown.
45.6 KB
Binary file not shown.
Binary file not shown.
694 KB
Loading

0 commit comments

Comments
 (0)