Skip to content

Commit

Permalink
Add StackBlitz link, use monolithic engine and next version
Browse files Browse the repository at this point in the history
  • Loading branch information
tajo committed Dec 21, 2023
1 parent 3cae6c7 commit df279c1
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 26 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<p align="center">
<a href="https://baseweb.design">
<img width="250px" src="https://res.cloudinary.com/dawr8pobn/image/upload/v1556920604/base-web.svg">
</a>
</p>
<h1>Base Web React Components</h1>

<h1 align="center">Base Web React Components</h1>
- [Documentation](https://baseweb.design)
- [Component catalog](https://baseweb.design/ladle)
- [Stackblitz playground](https://baseweb.design/new)

⚠️ **Maintenance status**. We are limiting our engagement with this repository while still mirroring our internal development. For more details, please check [Open Source Engagement and Future](https://baseweb.design/blog/open-source-engagement/). If you are an Uber developer and looking to open an issue, use this [link](https://t.uber.com/ui-platform-bug-2) or [contribute](https://p.uber.com/base-code).

Expand All @@ -24,10 +22,10 @@ Add `baseui` and its peer dependencies to your project:

```bash
# using pnpm
pnpm add baseui styletron-react styletron-engine-monolithic
pnpm add baseui@next styletron-react styletron-engine-monolithic

# using npm
npm install baseui styletron-react styletron-engine-monolithic
npm install baseui@next styletron-react styletron-engine-monolithic
```

```javascript
Expand Down
6 changes: 3 additions & 3 deletions documentation-site/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz
.pnpm/install-state.gz

# testing
/coverage
Expand All @@ -22,8 +22,8 @@

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
pnpm-error.log*

# local env files
.env*.local
Expand Down
2 changes: 1 addition & 1 deletion documentation-site/examples/form-control/validation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {FormControl} from 'baseui/form-control';
import {Input} from 'baseui/input';
import {useStyletron} from 'baseui';
import {Alert} from 'baseui/icon';
import {validate as validateEmail} from 'email-validator'; // add this package to your repo: `$ yarn add email-validator`
import {validate as validateEmail} from 'email-validator'; // add this package to your repo: `$ pnpm add email-validator`

function Negative() {
const [css, theme] = useStyletron();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cd password-generator
Next, we need to pull in the packages for Base Web.

```shell
yarn add baseui styletron-engine-atomic styletron-react
pnpm add baseui@next styletron-engine-monolithic styletron-react
```

You might be asking "What's Styletron?". [Styletron](https://www.styletron.org) is a CSS-in-JS solution for component-oriented styling.
Expand All @@ -38,7 +38,7 @@ As per [Base Web's set up instructions](/getting-started/setup/), we need to wra

```js
import { Provider as StyletronProvider } from "styletron-react";
import { Client as Styletron } from "styletron-engine-atomic";
import { Client as Styletron } from "styletron-engine-monolithic";
import { LightTheme, BaseProvider } from "baseui";

const engine = new Styletron();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ All these parts work in harmony—an update to one of them synchronizes the stat
React View is open sourced as [uber/react-view](https://github.com/uber/react-view) and you can get it from npm right now:

```
yarn add react-view
pnpm add react-view
```

## Wait...But Why?
Expand Down
18 changes: 9 additions & 9 deletions documentation-site/pages/getting-started/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ export default Layout;

## Installing Base Web

You can quickly test Base Web by using [StackBlitz](https://baseweb.design/new).

Base Web is available on npm as [baseui](https://npmjs.com/package/baseui). This single
package contains all Base Web components.

```bash
# using yarn
yarn add baseui styletron-engine-atomic styletron-react
# using pnpm
pnpm add baseui@next styletron-engine-monolithic styletron-react

# using npm
npm install baseui styletron-engine-atomic styletron-react
npm install baseui@next styletron-engine-monolithic styletron-react
```

Base Web ships with both Flow and TypeScript support.

Our React components don't use [PropTypes](https://reactjs.org/docs/typechecking-with-proptypes.html).
Base Web ships with TypeScript support.

[Styletron](https://www.styletron.org/) is a toolkit for component-oriented styling, part of the CSS-in-JS family. Base Web requires Styletron as a peer dependency (it uses it to apply styles to components), so you need to add Styletron as a dependency too.

Expand All @@ -47,8 +47,8 @@ Assuming you already have ESLint installed, run:
# npm
npm install eslint-plugin-baseui --save-dev

# yarn
yarn add eslint-plugin-baseui --dev
# pnpm
pnpm add eslint-plugin-baseui --dev
```

Then add it to your ESLint configuration:
Expand Down Expand Up @@ -87,7 +87,7 @@ In order to use Base Web, you need to do a small setup and wrap the root of your
application with `StyletronProvider` and [`BaseProvider`](https://baseweb.design/components/base-provider) components:

```javascript
import { Client as Styletron } from "styletron-engine-atomic";
import { Client as Styletron } from "styletron-engine-monolithic";
import { Provider as StyletronProvider } from "styletron-react";
import { LightTheme, BaseProvider, styled } from "baseui";
import { StatefulInput } from "baseui/input";
Expand Down
2 changes: 1 addition & 1 deletion documentation-site/pages/guides/bidirectionality.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Add the `dir` attribute to the `body` of your application:
You have to change the `direction` property in the Base Web theme:

```javascript
import { Client as Styletron } from "styletron-engine-atomic";
import { Client as Styletron } from "styletron-engine-monolithic";
import { Provider as StyletronProvider } from "styletron-react";
import { LightTheme, BaseProvider } from "baseui";
import { StatefulInput } from "baseui/input";
Expand Down
2 changes: 1 addition & 1 deletion documentation-site/pages/guides/theming.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ While `ThemeProvider` will provide your theme object to any descendent Base Web
import React from "react";
import { BaseProvider, LightTheme } from "baseui";
import { Provider as StyletronProvider } from "styletron-react";
import { Client as Styletron } from "styletron-engine-atomic";
import { Client as Styletron } from "styletron-engine-monolithic";

const engine = new Styletron();

Expand Down

0 comments on commit df279c1

Please sign in to comment.