Skip to content

Commit

Permalink
Update theme.breakpoints.step type and default value to reflect time
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Oct 13, 2021
1 parent e55823f commit 0305939
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions docs/src/pages/customization/breakpoints/breakpoints.md
Expand Up @@ -70,8 +70,9 @@ You define your project's breakpoints in the `theme.breakpoints` section of your
<!-- Keep in sync with packages/mui-system/src/createTheme/createBreakpoints.d.ts -->

- [`theme.breakpoints.values`](/customization/default-theme/?expand-path=$.breakpoints.values): Default to the [above values](#default-breakpoints). The keys are your screen names, and the values are the min-width where that breakpoint should start.
- `theme.breakpoints.unit`: Default to `px`. The unit used for the breakpoint's values.
- `theme.breakpoints.step`: Default to 5 (`0.05px`). The increment used to implement exclusive breakpoints.
- `theme.breakpoints.unit`: Default to `'px'`. The unit used for the breakpoint's values.
- `theme.breakpoints.step`: Default to `5`. The increment divided by 100 used to implement exclusive breakpoints.
For example, `{ step: 5 }` means that `down(500)` will result in `'(max-width: 499.95px)'`.

If you change the default breakpoints's values, you need to provide them all:

Expand Down
7 changes: 4 additions & 3 deletions packages/mui-system/src/createTheme/createBreakpoints.d.ts
Expand Up @@ -59,10 +59,11 @@ export interface Breakpoints {

export interface BreakpointsOptions extends Partial<Breakpoints> {
/**
* The increment used to implement exclusive breakpoints.
* @default '0.05px'
* The increment divided by 100 used to implement exclusive breakpoints.
* For example, `step: 5` means that `down(500)` will result in `'(max-width: 499.95px)'`.
* @default 5
*/
step?: string | undefined;
step?: number | undefined;
/**
* The unit used for the breakpoint's values.
* @default 'px'
Expand Down

0 comments on commit 0305939

Please sign in to comment.