Skip to content

Commit

Permalink
improve details
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Oct 3, 2020
1 parent caffa57 commit 0346b2c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 30 deletions.
1 change: 0 additions & 1 deletion docs/src/pages/components/pagination/pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
title: React Pagination component
components: Pagination, PaginationItem
githubLabel: 'component: Pagination'
packageName: '@material-ui/lab'
---

# Pagination
Expand Down
31 changes: 6 additions & 25 deletions docs/src/pages/guides/migration-v4/migration-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ const theme = createMuitheme({

```diff
-import Autocomplete from '@material-ui/lab/Autocomplete';
-import useAutocomplete from '@material-ui/lab/useAutocomplete';
+import Autocomplete from '@material-ui/core/Autocomplete';
+import useAutoComplete from '@material-ui/core/useAutocomplete';
```

### Avatar
Expand Down Expand Up @@ -491,7 +493,11 @@ const theme = createMuitheme({

```diff
-import Pagination from '@material-ui/lab/Pagination';
-import PaginationItem from '@material-ui/lab/PaginationItem';
-import { usePagination } from '@material-ui/lab/Pagination';
+import Pagination from '@material-ui/core/Pagination';
+import PaginationItem from '@material-ui/core/PaginationItem';
+import usePagination from '@material-ui/core/usePagination';
```

- Rename `round` to `circular` for consistency. The possible values should be adjectives, not nouns:
Expand All @@ -503,13 +509,6 @@ const theme = createMuitheme({

### PaginationItem

- Move the component from the lab to the core. The component is now stable.

```diff
-import PaginationItem from '@material-ui/lab/PaginationItem';
+import PaginationItem from '@material-ui/core/PaginationItem';
```

- Rename `round` to `circular` for consistency. The possible values should be adjectives, not nouns:

```diff
Expand Down Expand Up @@ -785,21 +784,3 @@ const theme = createMuitheme({
-<Typography variant="srOnly">Create a user</Typography>
+<Span>Create a user</Span>
```

### useAutocomplete

- Move the hook from the lab to the core. It is now stable.

```diff
-import useAutocomplete from '@material-ui/lab/useAutocomplete';
+import useAutoComplete from '@material-ui/core/useAutocomplete';
```

### usePagination

- Move the hook from the lab to the core. It is now stable.

```diff
-import { usePagination } from '@material-ui/lab/Pagination';
+import usePagination from '@material-ui/core/usePagination';
```
5 changes: 1 addition & 4 deletions packages/material-ui/src/locale/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ export interface Localization {
};
};
MuiPagination?: {
defaultProps: {
'aria-label'?: string;
getItemAriaLabel?: (type: string, page: number, selected: boolean) => string;
};
defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
};
};
}
Expand Down

0 comments on commit 0346b2c

Please sign in to comment.