-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
yo react-zeal | ||
``` | ||
|
||
Viola! Now craft with React |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export that buttons
Add documentation for themr
…tor-react-zeal into document-react-toolbox
No description provided.