1 | "use client";
|
2 |
|
3 | import classNames from 'classnames';
|
4 | import * as React from 'react';
|
5 | import { useBootstrapPrefix } from './ThemeProvider';
|
6 | import { jsx as _jsx } from "react/jsx-runtime";
|
7 | const ButtonGroup = React.forwardRef(({
|
8 | bsPrefix,
|
9 | size,
|
10 | vertical = false,
|
11 | className,
|
12 | role = 'group',
|
13 |
|
14 | as: Component = 'div',
|
15 | ...rest
|
16 | }, ref) => {
|
17 | const prefix = useBootstrapPrefix(bsPrefix, 'btn-group');
|
18 | let baseClass = prefix;
|
19 | if (vertical) baseClass = `${prefix}-vertical`;
|
20 | return _jsx(Component, {
|
21 | ...rest,
|
22 | ref: ref,
|
23 | role: role,
|
24 | className: classNames(className, baseClass, size && `${prefix}-${size}`)
|
25 | });
|
26 | });
|
27 | ButtonGroup.displayName = 'ButtonGroup';
|
28 | export default ButtonGroup; |
\ | No newline at end of file |