Skip to content

added clear button #59

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

Merged
merged 3 commits into from
Mar 10, 2018
Merged

added clear button #59

merged 3 commits into from
Mar 10, 2018

Conversation

amr08
Copy link
Collaborator

@amr08 amr08 commented Mar 9, 2018

#50

Clear button styled and working. We can decide to move it wherever or leave it, but wanted to get this out while I had the chance. I also extended the width of the results component to try to squeeze a little extra room for text.

@@ -21,6 +21,7 @@ class FuncCard extends Component {
this.handleToggleCode = this.handleToggleCode.bind(this);
this.handleParamsChange = this.handleParamsChange.bind(this);
this.handleRunCode = this.handleRunCode.bind(this);
this.handleClearCode = this.handleClearCode.bind(this);
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe handleClearParams instead of handleClearCode?

<Highlight lang="js" value={callCode} />

<div className="results-div">
<Button floating className='grey darken-3 small-btn' waves='light' icon='clear' onClick={this.handleClearCode}>Clear</Button>
Copy link
Contributor

Choose a reason for hiding this comment

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

Disabling the button when there are no params might be good.

disabled={params.length === 0}

Copy link
Collaborator Author

@amr08 amr08 Mar 9, 2018

Choose a reason for hiding this comment

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

I like that - and if there is not a value in result

@mradenovic
Copy link
Contributor

I just realized that the text ofverflows button.

owerfloww

@amr08
Copy link
Collaborator Author

amr08 commented Mar 9, 2018

Yea it didn't look good adjacent to the params bar so that's why I put some opacity. Mentioned previously that we can move button wherever. I don't have any strong feels about where it lives.

Copy link
Contributor

@mradenovic mradenovic left a comment

Choose a reason for hiding this comment

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

Let's go forward with this for now. We can improve later 😄

@amr08
Copy link
Collaborator Author

amr08 commented Mar 9, 2018

#60 - I bet this will fix the mobile issue: there was an option to render as "children" in the docs.

<Carousel>
{funcCards}
</Carousel>
<Carousel children={funcCards} />
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't change anything 😞 It doesn't matter how you set the children property, it will end up as props.children in Carousel component. The final result is the same.

Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't work even if I replace everything in App with example code from https://react-materialize.github.io/#/carousel.

@jhowardjr jhowardjr merged commit 29d4bcd into develop Mar 10, 2018
@amr08 amr08 deleted the clear-button branch March 18, 2018 16:47
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.

3 participants