Skip to content

Commit a345550

Browse files
committed
fix: provder-all no longer requires default parameters
1 parent d70c54d commit a345550

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

src/provide-all.ts

+17-16
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,31 @@ import { provideShape } from "./tokens/provide-shape";
1414
import { provideSizing } from "./tokens/provide-sizing";
1515
import { provideTypography } from "./tokens/provide-typography";
1616

17-
export function provideAll(params: {
18-
color?: Partial<TColorProviderConstructorParams>,
19-
elevation?: Partial<TElevationProviderConstructorParams>,
20-
motion?: TMotionProviderConstructorParams,
21-
shape?: TShapeProviderConstructorParams,
22-
typography?: TTypographyProviderConstructorParams,
23-
border?: Partial<TBorderProviderConstructorParams>,
24-
sizing?: Partial<TSizingProviderConstructorParams>,
25-
}) {
17+
export function provideAll(params?: Partial<{
18+
color: Partial<TColorProviderConstructorParams>,
19+
elevation: Partial<TElevationProviderConstructorParams>,
20+
motion: TMotionProviderConstructorParams,
21+
shape: TShapeProviderConstructorParams,
22+
typography: TTypographyProviderConstructorParams,
23+
border: Partial<TBorderProviderConstructorParams>,
24+
sizing: Partial<TSizingProviderConstructorParams>,
25+
}>) {
2626
return ({
27-
color: provideColor(params.color),
28-
elevation: provideElevation(params.elevation),
29-
motion: provideMotion(params.motion),
30-
shape: provideShape(params.shape),
31-
typography: provideTypography(params.typography),
32-
border: provideBorder(params.border),
33-
sizing: provideSizing(params.sizing),
27+
color: provideColor(params?.color),
28+
elevation: provideElevation(params?.elevation),
29+
motion: provideMotion(params?.motion),
30+
shape: provideShape(params?.shape),
31+
typography: provideTypography(params?.typography),
32+
border: provideBorder(params?.border),
33+
sizing: provideSizing(params?.sizing),
3434
windowMediaQuery: provideWindowMediaQuery(),
3535
getAllPlugins() {
3636
return ([
3737
this.color.getPlugin(),
3838
this.elevation.getPlugin(),
3939
this.motion.getPlugin(),
4040
this.shape.getPlugin(),
41+
this.sizing.getPlugin(),
4142
this.typography.getPlugin(),
4243
this.border.getPlugin(),
4344
this.windowMediaQuery.getPlugin(),

0 commit comments

Comments
 (0)