mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-24 17:00:36 +01:00
Compare commits
4 Commits
fix/modal-
...
nuxthub-ci
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b270a3d9f3 | ||
|
|
9fbb233185 | ||
|
|
a22e334987 | ||
|
|
db72165654 |
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
@@ -50,7 +50,7 @@ jobs:
|
|||||||
run: pnpm run docs:build
|
run: pnpm run docs:build
|
||||||
|
|
||||||
- name: Deploy to NuxtHub
|
- name: Deploy to NuxtHub
|
||||||
uses: nuxt-hub/action@v1
|
uses: nuxt-hub/action@v1.1.4
|
||||||
id: deploy
|
id: deploy
|
||||||
with:
|
with:
|
||||||
project-key: ui-7eg3
|
project-key: ui-7eg3
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ extendDevtoolsMeta({ example: 'ModalExample' })
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, toRef, provide } from 'vue'
|
import { computed, toRef } from 'vue'
|
||||||
import { DialogRoot, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose, useForwardPropsEmits } from 'reka-ui'
|
import { DialogRoot, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose, useForwardPropsEmits } from 'reka-ui'
|
||||||
import { reactivePick } from '@vueuse/core'
|
import { reactivePick } from '@vueuse/core'
|
||||||
import { useAppConfig } from '#imports'
|
import { useAppConfig } from '#imports'
|
||||||
@@ -112,9 +112,6 @@ const ui = computed(() => modal({
|
|||||||
transition: props.transition,
|
transition: props.transition,
|
||||||
fullscreen: props.fullscreen
|
fullscreen: props.fullscreen
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// Blocks ButtonGroup injections to avoid side-effects if the modal is within a button group.
|
|
||||||
provide(buttonGroupInjectionKey, undefined)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import type { GetObjectField } from '../types/utils'
|
|||||||
export const buttonGroupInjectionKey: InjectionKey<ComputedRef<{
|
export const buttonGroupInjectionKey: InjectionKey<ComputedRef<{
|
||||||
size: ButtonGroupProps['size']
|
size: ButtonGroupProps['size']
|
||||||
orientation: ButtonGroupProps['orientation']
|
orientation: ButtonGroupProps['orientation']
|
||||||
}> | undefined> = Symbol('nuxt-ui.button-group')
|
}>> = Symbol('nuxt-ui.button-group')
|
||||||
|
|
||||||
type Props<T> = {
|
type Props<T> = {
|
||||||
size?: GetObjectField<T, 'size'>
|
size?: GetObjectField<T, 'size'>
|
||||||
@@ -14,7 +14,6 @@ type Props<T> = {
|
|||||||
|
|
||||||
export function useButtonGroup<T>(props: Props<T>) {
|
export function useButtonGroup<T>(props: Props<T>) {
|
||||||
const buttonGroup = inject(buttonGroupInjectionKey, undefined)
|
const buttonGroup = inject(buttonGroupInjectionKey, undefined)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
orientation: computed(() => buttonGroup?.value.orientation),
|
orientation: computed(() => buttonGroup?.value.orientation),
|
||||||
size: computed(() => props?.size ?? buttonGroup?.value.size)
|
size: computed(() => props?.size ?? buttonGroup?.value.size)
|
||||||
|
|||||||
Reference in New Issue
Block a user