From b60363eb7df6ebbb478887bad40b660ffb101ee9 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Mon, 4 Apr 2022 11:55:37 +0100 Subject: [PATCH] Update `screens` types --- types/config.d.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/types/config.d.ts b/types/config.d.ts index b033bc319ef6..933386e908ff 100644 --- a/types/config.d.ts +++ b/types/config.d.ts @@ -71,12 +71,15 @@ type DarkModeConfig = /** Use the `class` stategy with a custom class instead of `.dark`. */ | ['class', string] +type Screen = { raw: string } | { min: string } | { max: string } | { min: string; max: string } +type ScreensConfig = string[] | KeyValuePair + // Theme related config interface ThemeConfig { extend: Partial> /** Responsiveness */ - screens: ResolvableTo + screens: ResolvableTo /** Reusable base configs */ colors: ResolvableTo @@ -85,12 +88,7 @@ interface ThemeConfig { /** Components */ container: ResolvableTo< Partial<{ - screens: - | string[] /** List of breakpoints. E.g.: '400px', '500px' */ - /** Named breakpoints. E.g.: { sm: '400px' } */ - | Record - /** Name breakpoints with explicit min and max values. E.g.: { sm: { min: '300px', max: '400px' } } */ - | Record + screens: ScreensConfig center: boolean padding: string | Record }>