1 | "use client";
|
2 |
|
3 | import classNames from 'classnames';
|
4 | import * as React from 'react';
|
5 | import { useMemo } from 'react';
|
6 | import { useBootstrapPrefix } from './ThemeProvider';
|
7 | import CardHeaderContext from './CardHeaderContext';
|
8 | import { jsx as _jsx } from "react/jsx-runtime";
|
9 | const CardHeader = React.forwardRef(({
|
10 | bsPrefix,
|
11 | className,
|
12 |
|
13 | as: Component = 'div',
|
14 | ...props
|
15 | }, ref) => {
|
16 | const prefix = useBootstrapPrefix(bsPrefix, 'card-header');
|
17 | const contextValue = useMemo(() => ({
|
18 | cardHeaderBsPrefix: prefix
|
19 | }), [prefix]);
|
20 | return _jsx(CardHeaderContext.Provider, {
|
21 | value: contextValue,
|
22 | children: _jsx(Component, {
|
23 | ref: ref,
|
24 | ...props,
|
25 | className: classNames(className, prefix)
|
26 | })
|
27 | });
|
28 | });
|
29 | CardHeader.displayName = 'CardHeader';
|
30 | export default CardHeader; |
\ | No newline at end of file |