You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
527 B

import React from 'react';
import classNames from 'classnames';
export default function Divider({
prefixCls = 'ant',
type = 'horizontal',
className,
children,
...restProps,
}) {
const classString = classNames(className, `${prefixCls}-divider`, {
[`${prefixCls}-divider-${type}`]: true,
[`${prefixCls}-divider-with-text`]: children,
});
return (
<div className={classString} {...restProps}>
{children && <span className={`${prefixCls}-divider-inner-text`}>{children}</span>}
</div>
);
}