Skip to content

Commit b5eb21c

Browse files
committed
Allow customizing the container and app bar classnames.
1 parent 8a3f6b9 commit b5eb21c

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/FullscreenDialog.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ export default function FullscreenDialog (props, { muiTheme }) {
3434

3535
const {
3636
actionButton,
37+
appBarClassName,
3738
appBarStyle,
3839
appBarZDepth,
3940
children,
4041
closeIcon,
42+
containerClassName,
4143
containerStyle,
4244
immersive,
4345
onRequestClose,
@@ -53,6 +55,7 @@ export default function FullscreenDialog (props, { muiTheme }) {
5355
style={{ ...style, ...styles.root }}
5456
>
5557
<AppBar
58+
className={appBarClassName}
5659
title={title}
5760
titleStyle={titleStyle}
5861
style={{ ...styles.appBar, ...appBarStyle }}
@@ -65,7 +68,10 @@ export default function FullscreenDialog (props, { muiTheme }) {
6568
showMenuIconButton={onRequestClose != null}
6669
zDepth={immersive ? 0 : appBarZDepth}
6770
/>
68-
<div style={{ ...styles.container, ...containerStyle }}>
71+
<div
72+
className={containerClassName}
73+
style={{ ...styles.container, ...containerStyle }}
74+
>
6975
{children}
7076
</div>
7177
</FullscreenDialogFrame>
@@ -77,6 +83,10 @@ FullscreenDialog.propTypes = {
7783
* A `FlatButton` or `IconButton` that is used as affirmative action button.
7884
*/
7985
actionButton: PropTypes.node,
86+
/**
87+
* Set the CSS classes of the app bar.
88+
*/
89+
appBarClassName: PropTypes.string,
8090
/**
8191
* Overrides the inline-styles of the app bar.
8292
*/
@@ -93,6 +103,10 @@ FullscreenDialog.propTypes = {
93103
* Icon element used for the dismissive action. This is hidden if `onRequestClose` is not set.
94104
*/
95105
closeIcon: PropTypes.node,
106+
/**
107+
* Set the CSS classes of the dialog's children container.
108+
*/
109+
containerClassName: PropTypes.string,
96110
/**
97111
* Overrides the inline-styles of the dialog's children container.
98112
*/

0 commit comments

Comments
 (0)