-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deprecation instead of breaking change
- Loading branch information
1 parent
a21542a
commit f5e4a65
Showing
23 changed files
with
257 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import * as React from 'react'; | ||
import { StandardProps } from '..'; | ||
|
||
export interface GridListProps | ||
extends StandardProps<React.HTMLAttributes<HTMLUListElement>, GridListClassKey> { | ||
cellHeight?: number | 'auto'; | ||
cols?: number; | ||
component?: React.ElementType<GridListProps>; | ||
spacing?: number; | ||
} | ||
|
||
export type GridListClassKey = 'root'; | ||
|
||
declare const GridList: React.ComponentType<GridListProps>; | ||
|
||
export default GridList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// @inheritedComponent GridList | ||
|
||
import React from 'react'; | ||
import warning from 'warning'; | ||
import ImageList from '../ImageList'; | ||
|
||
/** | ||
* Deprecated, use ImageList instead. | ||
*/ | ||
export default function GridList(props) { | ||
warning( | ||
false, | ||
[ | ||
'Material-UI: the GridList component is deprecated.', | ||
'The component was renamed to ImageList.', | ||
].join('\n'), | ||
); | ||
return <ImageList {...props} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { default } from './GridList'; | ||
export * from './GridList'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './GridList'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import * as React from 'react'; | ||
import { StandardProps } from '..'; | ||
|
||
export interface GridListTileProps | ||
extends StandardProps<React.HTMLAttributes<HTMLLIElement>, GridListTileClassKey> { | ||
cols?: number; | ||
component?: React.ElementType<GridListTileProps>; | ||
rows?: number; | ||
} | ||
|
||
export type GridListTileClassKey = 'root' | 'tile' | 'imgFullHeight' | 'imgFullWidth'; | ||
|
||
declare const GridListTile: React.ComponentType<GridListTileProps>; | ||
|
||
export default GridListTile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// @inheritedComponent GridListTile | ||
|
||
import React from 'react'; | ||
import warning from 'warning'; | ||
import ImageListTile from '../ImageListTile'; | ||
|
||
/** | ||
* Deprecated, use ImageListTile instead. | ||
*/ | ||
export default function GridListTile(props) { | ||
warning( | ||
false, | ||
[ | ||
'Material-UI: the GridListTile component is deprecated.', | ||
'The component was renamed to ImageListTile.', | ||
].join('\n'), | ||
); | ||
return <ImageListTile {...props} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { default } from './GridListTile'; | ||
export * from './GridListTile'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './GridListTile'; |
27 changes: 27 additions & 0 deletions
27
packages/material-ui/src/GridListTileBar/GridListTileBar.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import * as React from 'react'; | ||
import { StandardProps } from '..'; | ||
|
||
export interface GridListTileBarProps extends StandardProps<{}, GridListTileBarClassKey> { | ||
actionIcon?: React.ReactNode; | ||
actionPosition?: 'left' | 'right'; | ||
subtitle?: React.ReactNode; | ||
title?: React.ReactNode; | ||
titlePosition?: 'top' | 'bottom'; | ||
} | ||
|
||
export type GridListTileBarClassKey = | ||
| 'root' | ||
| 'titlePositionBottom' | ||
| 'titlePositionTop' | ||
| 'rootSubtitle' | ||
| 'titleWrap' | ||
| 'titleWrapActionPosLeft' | ||
| 'titleWrapActionPosRight' | ||
| 'title' | ||
| 'subtitle' | ||
| 'actionIcon' | ||
| 'actionIconActionPosLeft'; | ||
|
||
declare const GridListTileBar: React.ComponentType<GridListTileBarProps>; | ||
|
||
export default GridListTileBar; |
19 changes: 19 additions & 0 deletions
19
packages/material-ui/src/GridListTileBar/GridListTileBar.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// @inheritedComponent GridListTileBar | ||
|
||
import React from 'react'; | ||
import warning from 'warning'; | ||
import ImageListTileBar from '../ImageListTileBar'; | ||
|
||
/** | ||
* Deprecated, use ImageListTileBar instead. | ||
*/ | ||
export default function GridListTileBar(props) { | ||
warning( | ||
false, | ||
[ | ||
'Material-UI: the GridListTileBar component is deprecated.', | ||
'The component was renamed to ImageListTileBar.', | ||
].join('\n'), | ||
); | ||
return <ImageListTileBar {...props} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { default } from './GridListTileBar'; | ||
export * from './GridListTileBar'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './GridListTileBar'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import 'docs/src/modules/components/bootstrap'; | ||
// --- Post bootstrap ----- | ||
import React from 'react'; | ||
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; | ||
import markdown from './grid-list-tile-bar.md'; | ||
|
||
function Page() { | ||
return <MarkdownDocs markdown={markdown} />; | ||
} | ||
|
||
export default Page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
filename: /packages/material-ui/src/GridListTileBar/GridListTileBar.js | ||
--- | ||
|
||
<!--- This documentation is automatically generated, do not try to edit it. --> | ||
|
||
# GridListTileBar API | ||
|
||
<p class="description">The API documentation of the GridListTileBar React component. Learn more about the properties and the CSS customization points.</p> | ||
|
||
```js | ||
import GridListTileBar from '@material-ui/core/GridListTileBar'; | ||
``` | ||
|
||
Deprecated, use ImageListTileBar instead. | ||
|
||
## Props | ||
|
||
| Name | Type | Default | Description | | ||
|:-----|:-----|:--------|:------------| | ||
|
||
Any other properties supplied will be spread to the root element ([GridListTileBar](/api/grid-list-tile-bar/)). | ||
|
||
## Inheritance | ||
|
||
The properties of the [GridListTileBar](/api/grid-list-tile-bar/) component are also available. | ||
You can take advantage of this behavior to [target nested components](/guides/api/#spread). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import 'docs/src/modules/components/bootstrap'; | ||
// --- Post bootstrap ----- | ||
import React from 'react'; | ||
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; | ||
import markdown from './grid-list-tile.md'; | ||
|
||
function Page() { | ||
return <MarkdownDocs markdown={markdown} />; | ||
} | ||
|
||
export default Page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
filename: /packages/material-ui/src/GridListTile/GridListTile.js | ||
--- | ||
|
||
<!--- This documentation is automatically generated, do not try to edit it. --> | ||
|
||
# GridListTile API | ||
|
||
<p class="description">The API documentation of the GridListTile React component. Learn more about the properties and the CSS customization points.</p> | ||
|
||
```js | ||
import GridListTile from '@material-ui/core/GridListTile'; | ||
``` | ||
|
||
Deprecated, use ImageListTile instead. | ||
|
||
## Props | ||
|
||
| Name | Type | Default | Description | | ||
|:-----|:-----|:--------|:------------| | ||
|
||
Any other properties supplied will be spread to the root element ([GridListTile](/api/grid-list-tile/)). | ||
|
||
## Inheritance | ||
|
||
The properties of the [GridListTile](/api/grid-list-tile/) component are also available. | ||
You can take advantage of this behavior to [target nested components](/guides/api/#spread). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import 'docs/src/modules/components/bootstrap'; | ||
// --- Post bootstrap ----- | ||
import React from 'react'; | ||
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; | ||
import markdown from './grid-list.md'; | ||
|
||
function Page() { | ||
return <MarkdownDocs markdown={markdown} />; | ||
} | ||
|
||
export default Page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
filename: /packages/material-ui/src/GridList/GridList.js | ||
--- | ||
|
||
<!--- This documentation is automatically generated, do not try to edit it. --> | ||
|
||
# GridList API | ||
|
||
<p class="description">The API documentation of the GridList React component. Learn more about the properties and the CSS customization points.</p> | ||
|
||
```js | ||
import GridList from '@material-ui/core/GridList'; | ||
``` | ||
|
||
Deprecated, use ImageList instead. | ||
|
||
## Props | ||
|
||
| Name | Type | Default | Description | | ||
|:-----|:-----|:--------|:------------| | ||
|
||
Any other properties supplied will be spread to the root element ([GridList](/api/grid-list/)). | ||
|
||
## Inheritance | ||
|
||
The properties of the [GridList](/api/grid-list/) component are also available. | ||
You can take advantage of this behavior to [target nested components](/guides/api/#spread). | ||
|