From fffabbe9a464541d038f649fea81a2ed171ff4b2 Mon Sep 17 00:00:00 2001 From: Harrison Oglesby Date: Mon, 19 Dec 2022 13:47:15 -0800 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/28201 - Make a LightDarkPreview annotation Add LightDarkPreview annotation --- .../mozilla/fenix/compose/annotation/LightDarkPreview.kt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 mobile/android/fenix/app/src/main/java/org/mozilla/fenix/compose/annotation/LightDarkPreview.kt diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/compose/annotation/LightDarkPreview.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/compose/annotation/LightDarkPreview.kt new file mode 100644 index 000000000000..a074263a3cfe --- /dev/null +++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/compose/annotation/LightDarkPreview.kt @@ -0,0 +1,16 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.fenix.compose.annotation + +import android.content.res.Configuration +import androidx.compose.ui.tooling.preview.Preview + +/** + * A wrapper annotation for the two uiMode that are commonly used + * in Compose preview functions. + */ +@Preview(uiMode = Configuration.UI_MODE_NIGHT_YES) +@Preview(uiMode = Configuration.UI_MODE_NIGHT_NO) +annotation class LightDarkPreview -- 2.11.4.GIT