Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document React Toolbox #12

Merged
merged 8 commits into from
Jan 5, 2017
Merged

Document React Toolbox #12

merged 8 commits into from
Jan 5, 2017

Conversation

bmatto
Copy link
Contributor

@bmatto bmatto commented Dec 30, 2016

No description provided.

@bmatto bmatto self-assigned this Dec 30, 2016
yo react-zeal
```

Viola! Now craft with React
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Voila ;) I'd probably end this with a period, as well as the comments above.

@@ -41,3 +49,48 @@ import styles from './styles.scss'
```

In order to better support usage inside Rails etc we have moved the public directory inside the client directory. Thus the frameworks' root will not be cluttered with anything other than the client directory. The generated app will run with `npm start` and you can still develop on `localhost:3000` if you are not in the context of a larger framework.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think frameworks' should be framework's? But I'm not entirely sure what you're referring to--the Rails (or other) framework you'd be generating into?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm referring to multiple frameworks, Rails and Phoenix specifically and so my intention is plural possessive.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, got it. I guess my confusion was that you'd only be using one framework at any given time, which would require a singular form, but with that clarification I think your wording makes sense.

```
This allows the apps `ThemeProvider` context to pass this information to react-toolbox. By default we follow this pattern for `ProgressBar` as an example.

Great, you now have hooked into the theme provider. Now you just have to import the _un-themed_ version of the component from react-toolbox and like the theme provider do the rest.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let the theme provider do the rest, I think?

@@ -41,3 +49,48 @@ import styles from './styles.scss'
```

In order to better support usage inside Rails etc we have moved the public directory inside the client directory. Thus the frameworks' root will not be cluttered with anything other than the client directory. The generated app will run with `npm start` and you can still develop on `localhost:3000` if you are not in the context of a larger framework.

## React Toolbox
The generator installs by default [React Toolbox](http://react-toolbox.com/) which is set of Material Design components. At Zeal we have found this project to be an excellent starting point for many common UI patterns. You can of-course ignore it and or remove it from the generated app if you are so inclined.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which is a set

### Using Customizable React Toolbox Components
To make for the most flexibility when dealing with React Toolbox we recommend following the pattern of manually adding and exporting the desired components theme. Then instead of importing the pre-themed component from `react-toolbox`, import the un-themed version. Don't worry, if you have exported the theme manually it will still have the default theme, and now you will have more flexibility in terms of overriding theme defaults.

For example you would like to use the button component from `react-toolbox` and would like to override the default primary color. You will want to import / export the that buttons theme from `react-toolbox` along with a hook for your customization.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export that buttons

@bmatto bmatto merged commit 4c4c041 into master Jan 5, 2017
@bmatto bmatto deleted the document-react-toolbox branch January 5, 2017 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants