Skip to content

Commit

Permalink
refactor(VLocaleProvider): tuning pass (#15255)
Browse files Browse the repository at this point in the history
* refactor(VLocaleProvider): tuning pass

* test(VLocaleProvider): fix test extension
  • Loading branch information
johnleider committed Jun 20, 2022
1 parent 4948571 commit 2c98db1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
@@ -1,11 +1,12 @@
// Styles
import './VLocaleProvider.sass'

// Composables
import { provideLocale } from '@/composables/locale'
import { provideRtl } from '@/composables/rtl'

// Utilities
import { defineComponent } from '@/util'
import { defineComponent, useRender } from '@/util'

export const VLocaleProvider = defineComponent({
name: 'VLocaleProvider',
Expand All @@ -24,7 +25,7 @@ export const VLocaleProvider = defineComponent({
const localeInstance = provideLocale(props)
const { rtlClasses } = provideRtl(props, localeInstance)

return () => (
useRender(() => (
<div
class={[
'v-locale-provider',
Expand All @@ -33,6 +34,8 @@ export const VLocaleProvider = defineComponent({
>
{ slots.default?.() }
</div>
)
))

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

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

const props = {}

const stories = {
Default: <VLocaleProvider />,
}
// Tests
describe('VLocaleProvider', () => {
generate({ stories, props, component: VLocaleProvider })
})

0 comments on commit 2c98db1

Please sign in to comment.