TeamWertarbyte/material-ui-fullscreen-dialog

Remove close button

Closed this issue · 1 comments

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.

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.