From 3b386e147f22db0ff89fe4036454a11ab403808e Mon Sep 17 00:00:00 2001 From: Julien Goux Date: Thu, 6 Sep 2018 10:56:43 +0200 Subject: [PATCH 1/3] Add position="relative" --- packages/material-ui/src/AppBar/AppBar.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/material-ui/src/AppBar/AppBar.js b/packages/material-ui/src/AppBar/AppBar.js index 2b0794c41222dc..46be81d7b5342e 100644 --- a/packages/material-ui/src/AppBar/AppBar.js +++ b/packages/material-ui/src/AppBar/AppBar.js @@ -46,6 +46,10 @@ export const styles = theme => { positionStatic: { position: 'static', }, + /* Styles applied to the root element if `position="relative"`. */ + positionRelative: { + position: 'relative', + }, /* Styles applied to the root element if `color="default"`. */ colorDefault: { backgroundColor: backgroundColorDefault, @@ -107,7 +111,7 @@ AppBar.propTypes = { * [here](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning). * Note: `sticky` is not universally supported and will fall back to `static` when unavailable. */ - position: PropTypes.oneOf(['fixed', 'absolute', 'sticky', 'static']), + position: PropTypes.oneOf(['fixed', 'absolute', 'sticky', 'static', 'relative']), }; AppBar.defaultProps = { From 8ee8528fa81475e960a0805c34c25c8b7bb184ba Mon Sep 17 00:00:00 2001 From: Julien Goux Date: Thu, 6 Sep 2018 11:01:28 +0200 Subject: [PATCH 2/3] Update AppBar types --- packages/material-ui/src/AppBar/AppBar.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/material-ui/src/AppBar/AppBar.d.ts b/packages/material-ui/src/AppBar/AppBar.d.ts index fa5ca4a3f06676..fc5f18faaa2999 100644 --- a/packages/material-ui/src/AppBar/AppBar.d.ts +++ b/packages/material-ui/src/AppBar/AppBar.d.ts @@ -3,7 +3,7 @@ import { PaperProps } from '../Paper'; export interface AppBarProps extends StandardProps { color?: PropTypes.Color; - position?: 'fixed' | 'absolute' | 'sticky' | 'static'; + position?: 'fixed' | 'absolute' | 'sticky' | 'static' | 'relative'; } export type AppBarClassKey = @@ -12,6 +12,7 @@ export type AppBarClassKey = | 'positionAbsolute' | 'positionSticky' | 'positionStatic' + | 'positionRelative' | 'colorDefault' | 'colorPrimary' | 'colorSecondary'; From 6623de877219cde3da30bafa17758fdd011b2c7c Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Thu, 6 Sep 2018 23:04:21 +0200 Subject: [PATCH 3/3] yarn docs:api --- pages/api/app-bar.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/api/app-bar.md b/pages/api/app-bar.md index 9c0beee9ea959e..1553fe9edd3068 100644 --- a/pages/api/app-bar.md +++ b/pages/api/app-bar.md @@ -22,7 +22,7 @@ import AppBar from '@material-ui/core/AppBar'; | children * | node |   | The content of the component. | | classes | object |   | Override or extend the styles applied to the component. See [CSS API](#css-api) below for more details. | | color | enum: 'inherit' |
 'primary' |
 'secondary' |
 'default'
| 'primary' | The color of the component. It supports those theme colors that make sense for this component. | -| position | enum: 'fixed' |
 'absolute' |
 'sticky' |
 'static'
| 'fixed' | The positioning type. The behavior of the different options is described [here](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning). Note: `sticky` is not universally supported and will fall back to `static` when unavailable. | +| position | enum: 'fixed', 'absolute', 'sticky', 'static', 'relative'
| 'fixed' | The positioning type. The behavior of the different options is described [here](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning). Note: `sticky` is not universally supported and will fall back to `static` when unavailable. | Any other properties supplied will be spread to the root element ([Paper](/api/paper)). @@ -39,6 +39,7 @@ This property accepts the following keys: | positionAbsolute | Styles applied to the root element if `position="absolute"`. | positionSticky | Styles applied to the root element if `position="sticky"`. | positionStatic | Styles applied to the root element if `position="static"`. +| positionRelative | Styles applied to the root element if `position="relative"`. | colorDefault | Styles applied to the root element if `color="default"`. | colorPrimary | Styles applied to the root element if `color="primary"`. | colorSecondary | Styles applied to the root element if `color="secondary"`.