From 24533462ff8522915f39bbc913ac673fc91171d6 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. --- cookbook/cb-02-inline-styles tip.md | 4 ++-- cookbook/cb-02-inline-styles.md | 4 ++-- cookbook/cb-03-if-else-in-JSX tip.md | 4 ++-- cookbook/cb-03-if-else-in-JSX.md | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cookbook/cb-02-inline-styles tip.md b/cookbook/cb-02-inline-styles tip.md index 1e239419..79d7a902 100644 --- a/cookbook/cb-02-inline-styles tip.md +++ b/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/cookbook/cb-02-inline-styles.md b/cookbook/cb-02-inline-styles.md index 1aad6e26..9e2d3c41 100644 --- a/cookbook/cb-02-inline-styles.md +++ b/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/cookbook/cb-03-if-else-in-JSX tip.md b/cookbook/cb-03-if-else-in-JSX tip.md index 6cee70bc..d50ee3cc 100644 --- a/cookbook/cb-03-if-else-in-JSX tip.md +++ b/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/cookbook/cb-03-if-else-in-JSX.md b/cookbook/cb-03-if-else-in-JSX.md index ac617c36..e048a1ae 100644 --- a/cookbook/cb-03-if-else-in-JSX.md +++ b/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