Skip to content

Commit

Permalink
[#1885] Fix VaTabs grow (#1886)
Browse files Browse the repository at this point in the history
* fix: container width

* fix: replace useColor with useColors
  • Loading branch information
RVitaly1978 authored Jun 1, 2022
1 parent 3bf292f commit 8926e53
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/ui/src/components/va-tabs/VaTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ import {
import VaButton from '../va-button'
import VaConfig from '../va-config'
import { useStateful, useStatefulProps } from '../../composables/useStateful'
import { useColor } from '../../composables/useColor'
import { useColors } from '../../composables/useColor'
import { TabsViewKey, TabComponent } from './types'
import { useResizeObserver } from '../../composables/useResizeObserver'
Expand Down Expand Up @@ -112,7 +112,6 @@ export default defineComponent({
const tabsContentOffset = ref(0)
const startingXPoint = ref(0)
const animationIncluded = ref(false)
const { colorComputed } = useColor(props)
const { valueComputed: tabSelected }: { valueComputed: Ref<string | number | null> } = useStateful(props, emit)
const tabConfig = reactive({
VaTab: {
Expand Down Expand Up @@ -140,6 +139,9 @@ export default defineComponent({
const computedTabsClass = computed(() => ({ 'va-tabs--vertical': props.vertical }))
const { getColor } = useColors()
const colorComputed = computed(() => getColor(props.color))
const sliderStyles = computed(() => {
if (props.hideSlider) {
return { display: 'none' }
Expand Down Expand Up @@ -473,6 +475,10 @@ export default defineComponent({
min-width: 100%;
}
.va-tabs__tabs-items {
width: 100%;
}
.va-tab {
flex: 1 0 auto;
max-width: none;
Expand Down

0 comments on commit 8926e53

Please sign in to comment.