1 | import classNames from 'classnames';
|
2 | import * as React from 'react';
|
3 | import { useBootstrapPrefix, useBootstrapBreakpoints, useBootstrapMinBreakpoint } from './ThemeProvider';
|
4 | import createUtilityClassName, { responsivePropType } from './createUtilityClasses';
|
5 | import { jsx as _jsx } from "react/jsx-runtime";
|
6 | const Stack = React.forwardRef(({
|
7 | as: Component = 'div',
|
8 | bsPrefix,
|
9 | className,
|
10 | direction,
|
11 | gap,
|
12 | ...props
|
13 | }, ref) => {
|
14 | bsPrefix = useBootstrapPrefix(bsPrefix, direction === 'horizontal' ? 'hstack' : 'vstack');
|
15 | const breakpoints = useBootstrapBreakpoints();
|
16 | const minBreakpoint = useBootstrapMinBreakpoint();
|
17 | return _jsx(Component, { ...props,
|
18 | ref: ref,
|
19 | className: classNames(className, bsPrefix, ...createUtilityClassName({
|
20 | gap,
|
21 | breakpoints,
|
22 | minBreakpoint
|
23 | }))
|
24 | });
|
25 | });
|
26 | Stack.displayName = 'Stack';
|
27 | export default Stack; |
\ | No newline at end of file |