-
Notifications
You must be signed in to change notification settings - Fork 102
/
Copy pathindex.tsx
25 lines (20 loc) · 1.03 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
'use client';
import { useStylesheet } from '@ui5/webcomponents-react-base';
import { clsx } from 'clsx';
import React, { forwardRef } from 'react';
import type { CommonProps } from '../../types/index.js';
import { classNames, styleData } from './ToolbarSeparator.module.css.js';
export type ToolbarSeparatorPropTypes = CommonProps;
/**
* Creates a visual separator between the preceding and succeeding `Toolbar` item.
*
* __Note:__ This component is only compatible with the `Toolbar` component and __not__ with `ToolbarV2`. If you're using `ToolbarV2`, please use `ToolbarSeparatorV2` instead.
*/
const ToolbarSeparator = forwardRef<HTMLDivElement, ToolbarSeparatorPropTypes>((props, ref) => {
const { style, className, ...rest } = props;
useStylesheet(styleData, ToolbarSeparator.displayName);
const separatorClasses = clsx(classNames.separator, className);
return <div ref={ref} style={style} className={separatorClasses} role="separator" {...rest} />;
});
ToolbarSeparator.displayName = 'ToolbarSeparator';
export { ToolbarSeparator };