1234567891011121314151617181920212223242526272829303132 |
- import { createVNode as _createVNode } from "vue";
- // Components
- import { VIcon } from "../VIcon/index.mjs"; // Composables
- import { useLocale } from "../../composables/locale.mjs"; // Types
- export function useInputIcon(props) {
- const {
- t
- } = useLocale();
- function InputIcon(_ref) {
- let {
- name
- } = _ref;
- const localeKey = {
- prepend: 'prependAction',
- prependInner: 'prependAction',
- append: 'appendAction',
- appendInner: 'appendAction',
- clear: 'clear'
- }[name];
- const listener = props[`onClick:${name}`];
- const label = listener && localeKey ? t(`$vuetify.input.${localeKey}`, props.label ?? '') : undefined;
- return _createVNode(VIcon, {
- "icon": props[`${name}Icon`],
- "aria-label": label,
- "onClick": listener
- }, null);
- }
- return {
- InputIcon
- };
- }
- //# sourceMappingURL=InputIcon.mjs.map
|