1 | import classNames from 'classnames';
|
2 | import * as React from 'react';
|
3 | import { useBootstrapPrefix } from './ThemeProvider';
|
4 | import { jsx as _jsx } from "react/jsx-runtime";
|
5 | const defaultProps = {
|
6 | fluid: false
|
7 | };
|
8 | const Container = React.forwardRef(({
|
9 | bsPrefix,
|
10 | fluid,
|
11 |
|
12 | as: Component = 'div',
|
13 | className,
|
14 | ...props
|
15 | }, ref) => {
|
16 | const prefix = useBootstrapPrefix(bsPrefix, 'container');
|
17 | const suffix = typeof fluid === 'string' ? `-${fluid}` : '-fluid';
|
18 | return _jsx(Component, {
|
19 | ref: ref,
|
20 | ...props,
|
21 | className: classNames(className, fluid ? `${prefix}${suffix}` : prefix)
|
22 | });
|
23 | });
|
24 | Container.displayName = 'Container';
|
25 | Container.defaultProps = defaultProps;
|
26 | export default Container; |
\ | No newline at end of file |