-
-
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.
[theme] Add border-radius to the theme (#11847)
* Add border-radius to theme * my turn :)
- Loading branch information
1 parent
933899e
commit 470c3e5
Showing
23 changed files
with
62 additions
and
40 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
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
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
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 |
---|---|---|
@@ -1,42 +1,45 @@ | ||
import { Breakpoints, BreakpointsOptions } from './createBreakpoints'; | ||
import { Mixins, MixinsOptions } from './createMixins'; | ||
import { Palette, PaletteOptions } from './createPalette'; | ||
import { Typography, TypographyOptions } from './createTypography'; | ||
import { Shadows } from './shadows'; | ||
import { Shape, ShapeOptions } from './shape'; | ||
import { Spacing, SpacingOptions } from './spacing'; | ||
import { Transitions, TransitionsOptions } from './transitions'; | ||
import { Typography, TypographyOptions } from './createTypography'; | ||
import { ZIndex, ZIndexOptions } from './zIndex'; | ||
import { Overrides } from './overrides'; | ||
import { ComponentsProps } from './props'; | ||
|
||
export type Direction = 'ltr' | 'rtl'; | ||
|
||
export interface ThemeOptions { | ||
shape?: ShapeOptions; | ||
breakpoints?: BreakpointsOptions; | ||
direction?: Direction; | ||
palette?: PaletteOptions; | ||
typography?: TypographyOptions | ((palette: Palette) => TypographyOptions); | ||
mixins?: MixinsOptions; | ||
breakpoints?: BreakpointsOptions; | ||
overrides?: Overrides; | ||
palette?: PaletteOptions; | ||
props?: ComponentsProps; | ||
shadows?: Shadows; | ||
transitions?: TransitionsOptions; | ||
spacing?: SpacingOptions; | ||
transitions?: TransitionsOptions; | ||
typography?: TypographyOptions | ((palette: Palette) => TypographyOptions); | ||
zIndex?: ZIndexOptions; | ||
overrides?: Overrides; | ||
props?: ComponentsProps; | ||
} | ||
|
||
export interface Theme { | ||
shape: Shape; | ||
breakpoints: Breakpoints; | ||
direction: Direction; | ||
palette: Palette; | ||
typography: Typography; | ||
mixins: Mixins; | ||
breakpoints: Breakpoints; | ||
overrides?: Overrides; | ||
palette: Palette; | ||
props?: ComponentsProps; | ||
shadows: Shadows; | ||
transitions: Transitions; | ||
spacing: Spacing; | ||
transitions: Transitions; | ||
typography: Typography; | ||
zIndex: ZIndex; | ||
overrides?: Overrides; | ||
props?: ComponentsProps; | ||
} | ||
|
||
export default function createMuiTheme(options?: ThemeOptions): Theme; |
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,9 @@ | ||
export interface Shape { | ||
borderRadius: number; | ||
} | ||
|
||
export type ShapeOptions = Partial<Shape>; | ||
|
||
declare const shape: Shape; | ||
|
||
export default shape; |
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,5 @@ | ||
const shape = { | ||
borderRadius: 4, | ||
}; | ||
|
||
export default shape; |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
export default { | ||
const spacing = { | ||
// All components align to an 8dp square baseline grid for mobile, tablet, and desktop. | ||
// https://material.io/guidelines/layout/metrics-keylines.html#metrics-keylines-baseline-grids | ||
// https://material.io/design/layout/understanding-layout.html#pixel-density | ||
unit: 8, | ||
}; | ||
|
||
export default spacing; |
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