| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,56 @@ |
| 1 |
+/* |
|
| 2 |
+ * Copyright (c) 2023 Samson Achiaga |
|
| 3 |
+ * |
|
| 4 |
+ * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 |
+ * you may not use this file except in compliance with the License. |
|
| 6 |
+ * You may obtain a copy of the License at |
|
| 7 |
+ * |
|
| 8 |
+ * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 9 |
+ * |
|
| 10 |
+ * Unless required by applicable law or agreed to in writing, software |
|
| 11 |
+ * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 12 |
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 13 |
+ * See the License for the specific language governing permissions and |
|
| 14 |
+ * limitations under the License. |
|
| 15 |
+ */ |
|
| 16 |
+ |
|
| 17 |
+package com.certified.audionote.ui.theme |
|
| 18 |
+ |
|
| 19 |
+import androidx.compose.foundation.* |
|
| 20 |
+import androidx.compose.material3.* |
|
| 21 |
+import androidx.compose.runtime.* |
|
| 22 |
+import androidx.compose.ui.* |
|
| 23 |
+ |
|
| 24 |
+/** |
|
| 25 |
+ * Created by MJ Jacobs on 2024/12/28 at 13:20 |
|
| 26 |
+ */ |
|
| 27 |
+ |
|
| 28 |
+val DarkColor = darkColorScheme( |
|
| 29 |
+ primary = primaryDark, |
|
| 30 |
+ secondary = primaryDarkDark, |
|
| 31 |
+ tertiary = primaryDarkerDark, |
|
| 32 |
+ onPrimary = accentDark, |
|
| 33 |
+ onSecondary = black |
|
| 34 |
+) |
|
| 35 |
+ |
|
| 36 |
+val LightColor = lightColorScheme( |
|
| 37 |
+ primary = primaryLight, |
|
| 38 |
+ secondary = primaryDarkLight, |
|
| 39 |
+ tertiary = primaryDarkerLight, |
|
| 40 |
+ onPrimary = accentLight, |
|
| 41 |
+ onSecondary = black |
|
| 42 |
+) |
|
| 43 |
+ |
|
| 44 |
+@Composable |
|
| 45 |
+fun AudioNoteTheme( |
|
| 46 |
+ isDarkTheme:Boolean = isSystemInDarkTheme(), |
|
| 47 |
+ content: @Composable () -> Unit |
|
| 48 |
+) {
|
|
| 49 |
+ val color = if (isDarkTheme) DarkColor else LightColor |
|
| 50 |
+ |
|
| 51 |
+ MaterialTheme( |
|
| 52 |
+ colorScheme = color, |
|
| 53 |
+ typography = typography, |
|
| 54 |
+ content = content |
|
| 55 |
+ ) |
|
| 56 |
+} |
|
| 0 | 57 |
\ No newline at end of file |