Skip to content

Commit b1cef51

Browse files
committed
fix(frontend): color icon for sidebar
1 parent e82a6c4 commit b1cef51

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

frontend/src/components/DashboardPage/AppSidebar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script setup lang="ts">
22
import NavExtra from '@/components/DashboardPage/NavExtra.vue'
3+
import NavFooter from '@/components/DashboardPage/NavFooter.vue'
34
import NavMain from '@/components/DashboardPage/NavMain.vue'
45
import NavStart from '@/components/DashboardPage/NavStart.vue'
5-
import NavUser from '@/components/DashboardPage/NavUser.vue'
66
import { type SidebarProps } from '@/components/ui/sidebar'
77
import { Sidebar, SidebarContent, SidebarFooter } from '@/components/ui/sidebar'
88
import { NAV_DATA } from '@/data/dashboard/HeaderNav.data'
@@ -22,7 +22,7 @@ const data = NAV_DATA
2222
<NavExtra title="Extra" :items="data.navExtra" :buttons="data.buttons" />
2323
</SidebarContent>
2424
<SidebarFooter>
25-
<NavUser :user="data.user" :buttons="data.buttons" />
25+
<NavFooter :user="data.user" :buttons="data.buttons" />
2626
</SidebarFooter>
2727
</Sidebar>
2828
</template>

frontend/src/components/DashboardPage/NavExtra.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ defineProps<{
2424
<SidebarMenuItem v-for="item in items" :key="item.title">
2525
<SidebarMenuButton :tooltip="item.title" as-child>
2626
<a :href="item.url">
27-
<component :is="item.icon" v-if="item.icon" />
27+
<component :is="item.icon" color="currentColor" v-if="item.icon" />
2828
<span>{{ item.title }}</span>
2929
</a>
3030
</SidebarMenuButton>

frontend/src/components/DashboardPage/NavUser.vue renamed to frontend/src/components/DashboardPage/NavFooter.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const props = defineProps<{
2323
@click="openLink(button.url)"
2424
:tooltip="button.title"
2525
>
26-
<component :size="16" :is="button.icon" v-if="button.icon" />
26+
<component :size="16" :is="button.icon" color="currentColor" v-if="button.icon" />
2727
</SidebarMenuButton>
2828
</div>
2929
</SidebarMenu>

frontend/src/components/DashboardPage/NavMain.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ defineProps<{
4242
<SidebarMenuItem v-if="item.items">
4343
<CollapsibleTrigger as-child>
4444
<SidebarMenuButton :tooltip="item.title">
45-
<component :is="item.icon" v-if="item.icon" />
45+
<component :is="item.icon" color="currentColor" v-if="item.icon" />
4646
<span>{{ item.title }}</span>
4747
<ChevronRight
4848
class="ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"
@@ -54,7 +54,7 @@ defineProps<{
5454
<SidebarMenuSubItem v-for="subItem in item.items" :key="subItem.title">
5555
<SidebarMenuSubButton as-child>
5656
<a :href="subItem.url">
57-
<component :is="subItem.icon" v-if="subItem.icon" />
57+
<component :is="subItem.icon" color="currentColor" v-if="subItem.icon" />
5858
<span>{{ subItem.title }}</span>
5959
</a>
6060
</SidebarMenuSubButton>
@@ -65,7 +65,7 @@ defineProps<{
6565
<SidebarMenuItem v-else>
6666
<SidebarMenuButton :tooltip="item.title" as-child>
6767
<a :href="item.url">
68-
<component :is="item.icon" v-if="item.icon" />
68+
<component :is="item.icon" color="currentColor" v-if="item.icon" />
6969
<span>{{ item.title }}</span>
7070
</a>
7171
</SidebarMenuButton>

frontend/src/components/ui/sidebar/SidebarMenuSubButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const props = withDefaults(
2929
:data-active="isActive"
3030
:class="
3131
cn(
32-
'flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground',
32+
'flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',
3333
'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground',
3434
size === 'sm' && 'text-xs',
3535
size === 'md' && 'text-sm',

0 commit comments

Comments
 (0)