Skip to content

Commit

Permalink
feat(useLayer): support color: inherit as special value
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-solanki committed Feb 17, 2023
1 parent 9a422bf commit 1975b04
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/components/demos/list/DemoListSlots.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ const items = [
</template>

<!-- 馃憠 Slot: Append -->
<template #append="{ index }">
<template #item-append="{ index }">
<ABtn
variant="outline"
class="text-sm opacity-35 min-h-[24px] spacing-50"
color="default"
color="inherit"
:states="false"
>
&#8984; {{ index + 1 }}
Expand Down
6 changes: 3 additions & 3 deletions docs/components/demos/table/DemoTableExtraColumn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ const cols = [
class="text-xs"
icon="i-bx-link-external"
icon-only
color="default"
color="inherit"
variant="text"
/>
<ABtn
class="text-xs"
icon="i-bx-edit-alt"
icon-only
variant="text"
color="default"
color="inherit"
/>
<ABtn
class="text-xs"
icon="i-bx-trash"
icon-only
variant="text"
color="default"
color="inherit"
/>
</div>
</template>
Expand Down
6 changes: 6 additions & 0 deletions packages/anu-vue/src/composables/useLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ export const useLayer = () => {
classes.push('text-[hsl(var(--a-layer-c))]')
}
}
else if (propColor === 'inherit') {
classes.push('text-inherit')

if (propVariant === 'outline')
classes.push('border-width-1 border-solid border-current')
}
else if (propColor) {
const _colord = colord(propColor as string)

Expand Down

0 comments on commit 1975b04

Please sign in to comment.