From 88724cd7f21c97f9f05ca129911cc2828eb8dfa6 Mon Sep 17 00:00:00 2001 From: Artem Sapegin Date: Fri, 14 Jul 2017 22:13:51 +0200 Subject: [PATCH] Docs: Update examples syntax --- .../src/components/CounterButton/Readme.md | 4 +++- examples/basic/src/components/Modal/Readme.md | 22 +++++++++++-------- .../src/components/Placeholder/Readme.md | 4 +++- .../src/components/RandomButton/Readme.md | 6 +++-- .../src/components/WrappedButton/Readme.md | 4 +++- examples/cra/src/components/Placeholder.md | 4 +++- examples/cra/src/components/RandomButton.md | 6 +++-- .../customised/src/components/Modal/Readme.md | 22 +++++++++++-------- .../src/components/Placeholder/Readme.md | 4 +++- .../src/components/RandomButton/Readme.md | 6 +++-- .../src/components/CustomEndpoint/Readme.md | 2 +- .../src/components/CounterButton/Readme.md | 4 +++- .../preact/src/components/Modal/Readme.md | 22 +++++++++++-------- .../src/components/Placeholder/Readme.md | 4 +++- .../src/components/RandomButton/Readme.md | 6 +++-- .../src/components/WrappedButton/Readme.md | 4 +++- .../sections/src/components/Label/Readme.md | 4 +++- .../src/components/Placeholder/Example.md | 4 +++- .../src/components/Placeholder/_Readme.md | 4 +++- .../webpack/src/components/Placeholder.md | 4 +++- .../webpack/src/components/RandomButton.md | 6 +++-- 21 files changed, 96 insertions(+), 50 deletions(-) diff --git a/examples/basic/src/components/CounterButton/Readme.md b/examples/basic/src/components/CounterButton/Readme.md index 4a4201833..068c370a8 100644 --- a/examples/basic/src/components/CounterButton/Readme.md +++ b/examples/basic/src/components/CounterButton/Readme.md @@ -1 +1,3 @@ - +```js + +``` diff --git a/examples/basic/src/components/Modal/Readme.md b/examples/basic/src/components/Modal/Readme.md index 3da762950..7c6fd8d0f 100644 --- a/examples/basic/src/components/Modal/Readme.md +++ b/examples/basic/src/components/Modal/Readme.md @@ -1,14 +1,18 @@ Each example has its own state that you can access at the `state` variable and change with the `setState` function. Default state is `{}`. -
- - -

Hallo!

- -
-
+```jsx +
+ + +

Hallo!

+ +
+
+``` If you want to set the default state you can do something like that: - initialState = {count: 1}; - +```jsx +initialState = {count: 1}; + +``` diff --git a/examples/basic/src/components/Placeholder/Readme.md b/examples/basic/src/components/Placeholder/Readme.md index 208ff9d8d..f98f57553 100644 --- a/examples/basic/src/components/Placeholder/Readme.md +++ b/examples/basic/src/components/Placeholder/Readme.md @@ -1 +1,3 @@ - +```jsx + +``` diff --git a/examples/basic/src/components/RandomButton/Readme.md b/examples/basic/src/components/RandomButton/Readme.md index 375d8d3e0..c5a2df5ff 100644 --- a/examples/basic/src/components/RandomButton/Readme.md +++ b/examples/basic/src/components/RandomButton/Readme.md @@ -1,4 +1,6 @@ You can `require` external files in your examples: - const names = require('dog-names').all; - +```jsx +const names = require('dog-names').all; + +``` diff --git a/examples/basic/src/components/WrappedButton/Readme.md b/examples/basic/src/components/WrappedButton/Readme.md index 64b8f2c0a..8cfcfac09 100644 --- a/examples/basic/src/components/WrappedButton/Readme.md +++ b/examples/basic/src/components/WrappedButton/Readme.md @@ -1,3 +1,5 @@ Enhanced/Decorated components work as well: - I'm a wrapped button +```jsx +I'm a wrapped button +``` diff --git a/examples/cra/src/components/Placeholder.md b/examples/cra/src/components/Placeholder.md index 208ff9d8d..f98f57553 100644 --- a/examples/cra/src/components/Placeholder.md +++ b/examples/cra/src/components/Placeholder.md @@ -1 +1,3 @@ - +```jsx + +``` diff --git a/examples/cra/src/components/RandomButton.md b/examples/cra/src/components/RandomButton.md index 375d8d3e0..c5a2df5ff 100644 --- a/examples/cra/src/components/RandomButton.md +++ b/examples/cra/src/components/RandomButton.md @@ -1,4 +1,6 @@ You can `require` external files in your examples: - const names = require('dog-names').all; - +```jsx +const names = require('dog-names').all; + +``` diff --git a/examples/customised/src/components/Modal/Readme.md b/examples/customised/src/components/Modal/Readme.md index f61fe51fd..4be85777d 100644 --- a/examples/customised/src/components/Modal/Readme.md +++ b/examples/customised/src/components/Modal/Readme.md @@ -1,14 +1,18 @@ Each example has its own state that you can access at the `state` variable and change with the `setState` function. Default state is `{}`. -
- - -

Hallo!

- -
-
+```jsx +
+ + +

Hallo!

+ +
+
+``` If you want to set the default state you can do something like that: - initialState = {count: 1}; - +```jsx +initialState = {count: 1}; + +``` diff --git a/examples/customised/src/components/Placeholder/Readme.md b/examples/customised/src/components/Placeholder/Readme.md index 208ff9d8d..f98f57553 100644 --- a/examples/customised/src/components/Placeholder/Readme.md +++ b/examples/customised/src/components/Placeholder/Readme.md @@ -1 +1,3 @@ - +```jsx + +``` diff --git a/examples/customised/src/components/RandomButton/Readme.md b/examples/customised/src/components/RandomButton/Readme.md index 375d8d3e0..c5a2df5ff 100644 --- a/examples/customised/src/components/RandomButton/Readme.md +++ b/examples/customised/src/components/RandomButton/Readme.md @@ -1,4 +1,6 @@ You can `require` external files in your examples: - const names = require('dog-names').all; - +```jsx +const names = require('dog-names').all; + +``` diff --git a/examples/express/src/components/CustomEndpoint/Readme.md b/examples/express/src/components/CustomEndpoint/Readme.md index a8d9d21d6..62017ccd7 100644 --- a/examples/express/src/components/CustomEndpoint/Readme.md +++ b/examples/express/src/components/CustomEndpoint/Readme.md @@ -2,6 +2,6 @@ Custom Endpoint Example The example component invokes an endpoint added to the running styleguide server. -```example +```js ``` diff --git a/examples/preact/src/components/CounterButton/Readme.md b/examples/preact/src/components/CounterButton/Readme.md index 4a4201833..16f004731 100644 --- a/examples/preact/src/components/CounterButton/Readme.md +++ b/examples/preact/src/components/CounterButton/Readme.md @@ -1 +1,3 @@ - +```jsx + +``` diff --git a/examples/preact/src/components/Modal/Readme.md b/examples/preact/src/components/Modal/Readme.md index 3da762950..7c6fd8d0f 100644 --- a/examples/preact/src/components/Modal/Readme.md +++ b/examples/preact/src/components/Modal/Readme.md @@ -1,14 +1,18 @@ Each example has its own state that you can access at the `state` variable and change with the `setState` function. Default state is `{}`. -
- - -

Hallo!

- -
-
+```jsx +
+ + +

Hallo!

+ +
+
+``` If you want to set the default state you can do something like that: - initialState = {count: 1}; - +```jsx +initialState = {count: 1}; + +``` diff --git a/examples/preact/src/components/Placeholder/Readme.md b/examples/preact/src/components/Placeholder/Readme.md index 208ff9d8d..f98f57553 100644 --- a/examples/preact/src/components/Placeholder/Readme.md +++ b/examples/preact/src/components/Placeholder/Readme.md @@ -1 +1,3 @@ - +```jsx + +``` diff --git a/examples/preact/src/components/RandomButton/Readme.md b/examples/preact/src/components/RandomButton/Readme.md index 375d8d3e0..c5a2df5ff 100644 --- a/examples/preact/src/components/RandomButton/Readme.md +++ b/examples/preact/src/components/RandomButton/Readme.md @@ -1,4 +1,6 @@ You can `require` external files in your examples: - const names = require('dog-names').all; - +```jsx +const names = require('dog-names').all; + +``` diff --git a/examples/preact/src/components/WrappedButton/Readme.md b/examples/preact/src/components/WrappedButton/Readme.md index 64b8f2c0a..8cfcfac09 100644 --- a/examples/preact/src/components/WrappedButton/Readme.md +++ b/examples/preact/src/components/WrappedButton/Readme.md @@ -1,3 +1,5 @@ Enhanced/Decorated components work as well: - I'm a wrapped button +```jsx +I'm a wrapped button +``` diff --git a/examples/sections/src/components/Label/Readme.md b/examples/sections/src/components/Label/Readme.md index 4ca9f30fc..64b79cb18 100644 --- a/examples/sections/src/components/Label/Readme.md +++ b/examples/sections/src/components/Label/Readme.md @@ -1,3 +1,5 @@ Should use the `fantasy` font inherited from `body`: -