-
Notifications
You must be signed in to change notification settings - Fork 227
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
feat: Add roses example #312
Conversation
Codecov Report
@@ Coverage Diff @@
## master #312 +/- ##
=======================================
Coverage 97.25% 97.25%
=======================================
Files 36 36
Lines 1491 1491
Branches 164 164
=======================================
Hits 1450 1450
Misses 41 41 Continue to review full report at Codecov.
|
examples/roses/README.md
Outdated
@@ -0,0 +1,29 @@ | |||
# Roses Example | |||
|
|||
This is an example of a product feedback form using only MDC React components. This also uses some MDC Web-only packages, which are just styles ([typography](https://github.com/material-components/material-components-web/tree/master/packages/mdc-typography), [theme]https://github.com/material-components/material-components-web/tree/master/packages/mdc-theme, and [shape](https://github.com/material-components/material-components-web/tree/master/packages/mdc-shape)). |
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.
missing a bracket after theme
examples/roses/README.md
Outdated
|
||
1. `cd ./examples/roses` | ||
1. `npm i` | ||
1. `npk start` |
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.
typo: npm
examples/roses/Feedback.js
Outdated
import Button from '@material/react-button'; | ||
import MaterialIcon from '@material/react-material-icon'; | ||
|
||
import './index.scss'; |
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.
unnecessary since it's already imported in index.js
|
||
class Feedback extends React.Component { | ||
state = { | ||
feedback: '', |
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.
feedback: '', | |
feedback: '', | |
feedbackChips: [], |
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.
Add selected chips to state too
examples/roses/Feedback.js
Outdated
alt='red roses logo' | ||
/> | ||
{this.renderMessage()} | ||
<ChipSet filter> |
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.
<ChipSet filter> | |
<ChipSet | |
filter | |
selectedChipIds={this.state.feedbackChips} | |
handleSelect={(selectedChipIds) => this.setState({feedbackChips: selectedChipIds})} | |
> |
Also want to add analytics |
Don't think I can add analytics to a not-live site |
Also added note to readme about being on node v10.4.x |
In an attempt to use more of our components, testing/dogfooding, and show casing, I started with this product feedback page using text field, top app bar, chips, and button.