UNPKG

ano-ui

Version:

<p align="center"> <img src="https://github.com/ano-ui/ano-ui/raw/main/public/logo.svg" style="width:100px;" /> <h1 align="center">Ano-UI (WIP)</h1> <p align="center">An UniApp UI components with UnoCSS.</p> </p> <p align="center"> <a href="https://www.np

31 lines (27 loc) 1.04 kB
import type { ExtractPropTypes } from 'vue' import { useCustomClassProp, useCustomStyleProp } from '../composables' import { CANCEL_EVENT, CLOSED_EVENT, CLOSE_EVENT, OPENED_EVENT, OPEN_EVENT, UPDATE_SHOW_EVENT } from '../constants' import { isBoolean, makeArrayProp, makeNumberProp, truthProp } from '../utils' import type { ActionSheetAction } from './types' export const actionSheetProps = { customClass: useCustomClassProp, customStyle: useCustomStyleProp, show: Boolean, actions: makeArrayProp<ActionSheetAction>(), title: String, cancelText: String, description: String, closeable: truthProp, duration: makeNumberProp(300), round: truthProp, } export const actionSheetEmits = { [UPDATE_SHOW_EVENT]: (value: boolean) => isBoolean(value), [OPEN_EVENT]: () => true, [CLOSE_EVENT]: () => true, [OPENED_EVENT]: () => true, [CLOSED_EVENT]: () => true, [CANCEL_EVENT]: () => true, } export type ActionSheetProps = ExtractPropTypes<typeof actionSheetProps> export type ActionSheetEmits = typeof actionSheetEmits