Files
element-plus/packages/components/divider/src/divider.ts
Xc b22b9d3d3a docs(components): [divider] (#11558)
* Update divider docs with new syntax.
2023-02-14 22:31:33 +08:00

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>