-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
758439e
commit b9c009e
Showing
6 changed files
with
32 additions
and
18 deletions.
There are no files selected for viewing
9 changes: 7 additions & 2 deletions
9
frameworks/vue/src/components/color-picker/color-picker-value-text.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
<script lang="ts"> | ||
import type { PolymorphicProps } from '../factory' | ||
import { useColorPickerContext } from './use-color-picker-context' | ||
export interface ColorPickerValueTextProps extends PolymorphicProps {} | ||
</script> | ||
|
||
<script setup lang="ts"> | ||
import { colorPickerAnatomy } from '@ark-ui/anatomy' | ||
import { useSlots } from 'vue' | ||
import { ark } from '../factory' | ||
defineProps<ColorPickerValueTextProps>() | ||
const colorPicker = useColorPickerContext() | ||
const slots = useSlots() | ||
</script> | ||
|
||
<template> | ||
<ark.span v-bind="colorPickerAnatomy.build().valueText.attrs" :as-child="asChild"> | ||
<!-- TODO {slots.default?.() || api.value.valueAsString} --> | ||
<slot /> | ||
<slot> | ||
{{ slots.default?.() || colorPicker.valueAsString }} | ||
</slot> | ||
</ark.span> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
frameworks/vue/src/components/file-upload/file-upload-item-size-text.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
<script lang="ts"> | ||
import type { PolymorphicProps } from '../factory' | ||
import { useFileUploadItemPropsContext } from './use-file-upload-item-props-context' | ||
export interface FileUploadItemSizeTextProps extends PolymorphicProps {} | ||
</script> | ||
|
||
<script setup lang="ts"> | ||
import { useSlots } from 'vue' | ||
import { ark } from '../factory' | ||
import { useFileUploadContext } from './use-file-upload-context' | ||
import { useFileUploadItemPropsContext } from './use-file-upload-item-props-context' | ||
defineProps<FileUploadItemSizeTextProps>() | ||
const fileUpload = useFileUploadContext() | ||
const itemProps = useFileUploadItemPropsContext() | ||
const slots = useSlots() | ||
</script> | ||
|
||
<template> | ||
<ark.div v-bind="fileUpload.getItemSizeTextProps(itemProps)" :as-child="asChild"> | ||
<!-- TODO --> | ||
<!-- {slots.default?.() || api.value.getFileSize(itemProps.file)} --> | ||
<slot /> | ||
<slot> | ||
{{ slots.default?.() || fileUpload.getFileSize(itemProps.file) }} | ||
</slot> | ||
</ark.div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
<script lang="ts"> | ||
import type { PolymorphicProps } from '../factory' | ||
export interface SelectValueTextProps extends PolymorphicProps {} | ||
export interface SelectValueTextProps extends PolymorphicProps { | ||
placeholder?: string | ||
} | ||
</script> | ||
|
||
<script setup lang="ts"> | ||
import { selectAnatomy } from '@ark-ui/anatomy' | ||
import { useSlots } from 'vue' | ||
import { ark } from '../factory' | ||
import { useSelectContext } from './use-select-context' | ||
import { selectAnatomy } from '@ark-ui/anatomy' | ||
defineProps<SelectValueTextProps>() | ||
const props = defineProps<SelectValueTextProps>() | ||
const select = useSelectContext() | ||
const slots = useSlots() | ||
</script> | ||
|
||
<template> | ||
<ark.span v-bind="selectAnatomy.build().valueText.attrs" :as-child="asChild"> | ||
<!-- TODO --> | ||
<!-- {slots.default?.() || api.value.valueAsString || props.placeholder} --> | ||
{{ select.valueAsString }} | ||
<slot>{{ slots.default?.() || select.valueAsString || props.placeholder }}</slot> | ||
</ark.span> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters