From 4ae719c0ba7622896bc742be25f8a6f34766ce57 Mon Sep 17 00:00:00 2001 From: Jacob Pierce Date: Wed, 11 Dec 2024 14:57:32 -0800 Subject: [PATCH] AppBar: Use appBarText for text/icon colors - NavBar & NavbarLink now take & drill a `textColor` prop - In AppBar, the new token `appBarText` is passed to `textColor` - In AppBar, it is also used as the default color for icons, the page title, and the user's info This is done to permit plugins to customize the text in the AppBar so that they can ensure proper contrast with their chosen `appBar` token's value, which is used as the background. --- kolibri/core/assets/src/views/AppBar.vue | 12 ++++++++---- kolibri/core/assets/src/views/Navbar/NavbarLink.vue | 8 ++++++-- kolibri/core/assets/src/views/Navbar/index.vue | 9 +++++++-- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/kolibri/core/assets/src/views/AppBar.vue b/kolibri/core/assets/src/views/AppBar.vue index 75680355036..f14d8e211ae 100644 --- a/kolibri/core/assets/src/views/AppBar.vue +++ b/kolibri/core/assets/src/views/AppBar.vue @@ -10,9 +10,12 @@ @@ -26,7 +29,7 @@ > @@ -49,6 +52,7 @@ @@ -94,7 +98,7 @@ @@ -27,7 +28,7 @@ :ariaLabel="coreString('moreOptions')" icon="optionsHorizontal" appearance="flat-button" - :color="$themeTokens.text" + :color="textColor || $themeTokens.text" :primary="false" class="kiconbutton-style" > @@ -81,6 +82,10 @@ return values.every(value => value.link.name); }, }, + textColor: { + type: String, + default: null, + }, }, data() { return { mounted: false };