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

Remove close button #2

Closed
sdkcarlos opened this issue Feb 16, 2017 · 1 comment
Closed

Remove close button #2

sdkcarlos opened this issue Feb 16, 2017 · 1 comment
Assignees

Comments

@sdkcarlos
Copy link

Hi thanks for the component, pretty useful. Is there a way to remove the close button on the left side completely ? I get it working by providing an empty div and returning false in the onRequestClose event:

<FullscreenDialog
    open={this.state.open}
    onRequestClose={() => {
        //this.setState({ open: false })
        return false;
    }}
    title={'Demo dialog'}
    actionButton={
        <FlatButton
            label='Done'
            onTouchTap={() => this.setState({ open: false })}
        />        
    }
    closeIcon={<div></div>}
>

It works perfect, however i would like to know if there's a way to remove it completely as the button still occupies some space:

react_empty_button

Sorry if the answer is too obvious but i'm a noob in React , appreciate any help.

@leMaik leMaik self-assigned this Feb 16, 2017
@leMaik
Copy link
Member

leMaik commented Feb 16, 2017

Hi @sdkcarlos, good question, and not a noob question at all! 😉

We simply forgot that sometimes a fullscreen popup without a close/back button could be useful, so we didn't add an option to hide it.
I just released v0.2.0 that will hide the button if no onRequestClose function is set.

@leMaik leMaik closed this as completed Apr 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants