Skip to content

Commit

Permalink
fix(VDivider): change thickness to modify border width
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Jan 26, 2021
1 parent 78f6fec commit 30f5c22
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/vuetify/src/components/VDivider/VDivider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import makeProps from '@/util/makeProps'
import { useTheme } from '@/composables'

// Types
type DividerKey = 'maxHeight' | 'maxWidth' | 'minHeight' | 'minWidth'
type DividerKey = 'borderRightWidth' | 'borderTopWidth' | 'maxHeight' | 'maxWidth'
type DividerStyles = Partial<Record<DividerKey, string>>

export default defineComponent({
Expand All @@ -31,15 +31,11 @@ export default defineComponent({
const styles: DividerStyles = {}

if (props.length) {
const length = convertToUnit(props.length)

styles[props.vertical ? 'maxHeight' : 'maxWidth'] = length
styles[props.vertical ? 'maxHeight' : 'maxWidth'] = convertToUnit(props.length)
}

if (props.thickness) {
const length = convertToUnit(props.thickness)

styles[props.vertical ? 'minWidth' : 'minHeight'] = length
styles[props.vertical ? 'borderRightWidth' : 'borderTopWidth'] = convertToUnit(props.thickness)
}

return styles
Expand Down

0 comments on commit 30f5c22

Please sign in to comment.