Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

fix(docz-example-typescript): add scheduler dep and docs #1020 #1020

Merged
merged 3 commits into from
Aug 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions examples/flow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Flow Docz example

## Download

```sh
curl https://codeload.github.com/pedronauck/docz/tar.gz/master | tar -xz --strip=2 docz-master/examples/flow
mv flow docz-flow-example
cd docz-flow-example
```

## Setup

```sh
yarn # npm i
```

## Run

```sh
yarn dev # npm run dev
```
5 changes: 5 additions & 0 deletions examples/flow/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
exports.onCreateBabelConfig = ({ actions }) => {
actions.setBabelPreset({
name: `@babel/preset-flow`,
})
}
16 changes: 2 additions & 14 deletions examples/flow/src/components/Alert.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Alert
menu: Components
---

import { Playground, Props } from 'docz'
import { Alert } from './Alert'
import { Playground, Props } from "docz";
import { Alert } from "./Alert";

# Alert

Expand All @@ -26,15 +26,3 @@ import { Alert } from './Alert'
<Alert kind="negative">Some message</Alert>
<Alert kind="warning">Some message</Alert>
</Playground>

## Use with children as a function

<Playground>
{() => {
const message = 'Hello world'

return (
<Alert>{message}</Alert>
)
}}
</Playground>
21 changes: 21 additions & 0 deletions examples/typescript/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Typescript Docz example

## Download manually

```sh
curl https://codeload.github.com/pedronauck/docz/tar.gz/master | tar -xz --strip=2 docz-master/examples/typescript
mv typescript docz-typescript-example
cd docz-typescript-example
```

## Setup

```sh
yarn # npm i
```

## Run

```sh
yarn dev # npm run dev
```
3 changes: 2 additions & 1 deletion examples/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"@emotion/core": "^10.0.14",
"@emotion/styled": "^10.0.14",
"react": "^16.8.6",
"react-dom": "^16.8.6"
"react-dom": "^16.8.6",
"scheduler": "^0.15.0"
},
"devDependencies": {
"@types/react": "^16.8.23",
Expand Down