Skip to content

Commit

Permalink
refactor(VSelectionControlGroup): tuning pass (#15250)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Jun 22, 2022
1 parent f794318 commit 154568a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 21 deletions.
@@ -1,8 +1,4 @@
@use 'sass:map'
@use 'sass:list'
@use '../../styles/settings'
@use '../../styles/tools'
@use './variables' as *

.v-selection-control-group
grid-area: control
grid-area: $selection-control-group-grid-area
Expand Up @@ -2,8 +2,8 @@
import './VSelectionControlGroup.sass'

// Composables
import { useProxiedModel } from '@/composables/proxiedModel'
import { IconValue } from '@/composables/icons'
import { useProxiedModel } from '@/composables/proxiedModel'

// Utilities
import { computed, provide, toRef } from 'vue'
Expand Down Expand Up @@ -67,17 +67,15 @@ export const VSelectionControlGroup = defineComponent({
type: toRef(props, 'type'),
})

useRender(() => {
return (
<div
class="v-selection-control-group"
aria-labelled-by={ props.type === 'radio' ? id.value : undefined }
role={ props.type === 'radio' ? 'radiogroup' : undefined }
>
{ slots?.default?.() }
</div>
)
})
useRender(() => (
<div
class="v-selection-control-group"
aria-labelled-by={ props.type === 'radio' ? id.value : undefined }
role={ props.type === 'radio' ? 'radiogroup' : undefined }
>
{ slots?.default?.() }
</div>
))

return {}
},
Expand Down
@@ -0,0 +1,14 @@
/// <reference types="../../../../types/cypress" />

import { VSelectionControlGroup } from '..'
import { generate } from '@/../cypress/templates'

const props = {}

const stories = {
Default: <VSelectionControlGroup />,
}
// Tests
describe('VSelectionControlGroup', () => {
generate({ stories, props, component: VSelectionControlGroup })
})
@@ -1,4 +1 @@
@use '../../styles/settings';
@use '../../styles/tools';

// Defaults
$selection-control-group-grid-area: control !default;

0 comments on commit 154568a

Please sign in to comment.