mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
35 lines
893 B
TypeScript
35 lines
893 B
TypeScript
import { buildProps, definePropType } from '@element-plus/utils'
|
|
import type { ExtractPropTypes } from 'vue'
|
|
import type Divider from './divider.vue'
|
|
|
|
export type BorderStyle = CSSStyleDeclaration['borderStyle']
|
|
|
|
export const dividerProps = buildProps({
|
|
/**
|
|
* @description Set divider's direction
|
|
*/
|
|
direction: {
|
|
type: String,
|
|
values: ['horizontal', 'vertical'],
|
|
default: 'horizontal',
|
|
},
|
|
/**
|
|
* @description Set the style of divider
|
|
*/
|
|
contentPosition: {
|
|
type: String,
|
|
values: ['left', 'center', 'right'],
|
|
default: 'center',
|
|
},
|
|
/**
|
|
* @description the position of the customized content on the divider line
|
|
*/
|
|
borderStyle: {
|
|
type: definePropType<BorderStyle>(String),
|
|
default: 'solid',
|
|
},
|
|
} as const)
|
|
export type DividerProps = ExtractPropTypes<typeof dividerProps>
|
|
|
|
export type DividerInstance = InstanceType<typeof Divider>
|