From 7763c704b61ecdc67cdd95d4ea9d36a9d545b10e Mon Sep 17 00:00:00 2001 From: imevanc Date: Thu, 31 Aug 2023 23:42:37 +0100 Subject: [PATCH 1/3] fix the inconsistent types of the mergeBreakpointsInOrder function --- packages/mui-system/src/index.d.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/mui-system/src/index.d.ts b/packages/mui-system/src/index.d.ts index d8476ed22a34ac..a9f5521a773092 100644 --- a/packages/mui-system/src/index.d.ts +++ b/packages/mui-system/src/index.d.ts @@ -1,3 +1,4 @@ +import { CSSObject } from '@emotion/react'; import { ComposedStyleFunction, StyleFunction, @@ -13,6 +14,7 @@ import { sizing, typography, } from './Box'; +import { Breakpoints } from './createTheme/createBreakpoints'; // disable automatic export export {}; @@ -41,11 +43,11 @@ export function breakpoints, ): StyleFunction> & Props>; -// restructures the breakpoints in the in the correct order and merges all styles args +// restructures the breakpoints in the correct order and merges all styles args export function mergeBreakpointsInOrder( - breakpointsInput: { keys: string[]; up: (key: string) => string }, - ...styles: object[] -): object; + breakpointsInputs: Breakpoints, + styles: CSSObject[], +): CSSObject; export function compose>>(...args: T): ComposedStyleFunction; From 70e6e316ec6e0062be3b9cb260765f34c4557a4e Mon Sep 17 00:00:00 2001 From: imevanc Date: Mon, 4 Sep 2023 23:48:32 +0100 Subject: [PATCH 2/3] address PR suggestions --- packages/mui-system/src/index.d.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/mui-system/src/index.d.ts b/packages/mui-system/src/index.d.ts index a9f5521a773092..66f2a1ae612d31 100644 --- a/packages/mui-system/src/index.d.ts +++ b/packages/mui-system/src/index.d.ts @@ -1,4 +1,3 @@ -import { CSSObject } from '@emotion/react'; import { ComposedStyleFunction, StyleFunction, @@ -14,7 +13,6 @@ import { sizing, typography, } from './Box'; -import { Breakpoints } from './createTheme/createBreakpoints'; // disable automatic export export {}; @@ -34,7 +32,7 @@ export type BordersProps = PropsFor; // breakpoints.js type DefaultBreakPoints = 'xs' | 'sm' | 'md' | 'lg' | 'xl'; -export { handleBreakpoints } from './breakpoints'; +export { handleBreakpoints, mergeBreakpointsInOrder } from './breakpoints'; /** * @returns An enhanced stylefunction that considers breakpoints @@ -43,11 +41,6 @@ export function breakpoints, ): StyleFunction> & Props>; -// restructures the breakpoints in the correct order and merges all styles args -export function mergeBreakpointsInOrder( - breakpointsInputs: Breakpoints, - styles: CSSObject[], -): CSSObject; export function compose>>(...args: T): ComposedStyleFunction; From c2f67cf20b4192fe592b5336f288cde69ec3d2c2 Mon Sep 17 00:00:00 2001 From: ZeeshanTamboli Date: Tue, 5 Sep 2023 10:08:46 +0530 Subject: [PATCH 3/3] prettier --- packages/mui-system/src/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/mui-system/src/index.d.ts b/packages/mui-system/src/index.d.ts index 66f2a1ae612d31..7f24359229a63d 100644 --- a/packages/mui-system/src/index.d.ts +++ b/packages/mui-system/src/index.d.ts @@ -41,7 +41,6 @@ export function breakpoints, ): StyleFunction> & Props>; - export function compose>>(...args: T): ComposedStyleFunction; export type DisplayProps = PropsFor;