From b92c433c5001641c5354adf53a1cff7de1cd6aac Mon Sep 17 00:00:00 2001 From: Cheng Lou Date: Fri, 27 Sep 2013 02:50:42 -0400 Subject: [PATCH] small typo and code tag is now js highlight Was html before bc github screws up the js highlighting for jsx. --- docs/cookbook/cb-02-inline-styles tip.md | 4 ++-- docs/cookbook/cb-02-inline-styles.md | 4 ++-- docs/cookbook/cb-03-if-else-in-JSX tip.md | 4 ++-- docs/cookbook/cb-03-if-else-in-JSX.md | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/cookbook/cb-02-inline-styles tip.md b/docs/cookbook/cb-02-inline-styles tip.md index 1e239419be..79d7a902ce 100644 --- a/docs/cookbook/cb-02-inline-styles tip.md +++ b/docs/cookbook/cb-02-inline-styles tip.md @@ -6,9 +6,9 @@ permalink: inline-styles.html script: "cookbook/inline-styles.js" --- -In React, inline styles are nto specified as a string, but as an object whose key is the camelCased version of the style name, and whose value is the style's value in string: +In React, inline styles are not specified as a string, but as an object whose key is the camelCased version of the style name, and whose value is the style's value in string: -```html +```js /** @jsx React.DOM */ var divStyle = { diff --git a/docs/cookbook/cb-02-inline-styles.md b/docs/cookbook/cb-02-inline-styles.md index 1aad6e2641..9e2d3c411c 100644 --- a/docs/cookbook/cb-02-inline-styles.md +++ b/docs/cookbook/cb-02-inline-styles.md @@ -7,12 +7,12 @@ script: "cookbook/inline-styles.js" --- ### Problem -You want to put inline style to an element. +You want to apply inline style to an element. ### Solution Instead of writing a string, create an object whose key is the camelCased version of the style name, and whose value is the style's value, in string: -```html +```js /** @jsx React.DOM */ var divStyle = { diff --git a/docs/cookbook/cb-03-if-else-in-JSX tip.md b/docs/cookbook/cb-03-if-else-in-JSX tip.md index 6cee70bc53..d50ee3cc1a 100644 --- a/docs/cookbook/cb-03-if-else-in-JSX tip.md +++ b/docs/cookbook/cb-03-if-else-in-JSX tip.md @@ -8,7 +8,7 @@ script: "cookbook/inline-styles.js" `if-else` statements don't work inside JSX, since JSX is really just sugar for functions: -```html +```js /** @jsx React.DOM */ // this @@ -21,7 +21,7 @@ Which means `
Hello World!
` doesn't make sense What you're searching for is ternary expression: -```html +```js /** @jsx React.DOM */ // this diff --git a/docs/cookbook/cb-03-if-else-in-JSX.md b/docs/cookbook/cb-03-if-else-in-JSX.md index ac617c3631..e048a1ae36 100644 --- a/docs/cookbook/cb-03-if-else-in-JSX.md +++ b/docs/cookbook/cb-03-if-else-in-JSX.md @@ -12,7 +12,7 @@ You want to use conditional in JSX. ### Solution Don't forget that JSX is really just sugar for functions: -```html +```js /** @jsx React.DOM */ // this @@ -25,7 +25,7 @@ Which means `
Hello World!
` doesn't make sense What you're searching for is ternary expression: -```html +```js /** @jsx React.DOM */ // this