Skip to content

Commit 1e03dc4

Browse files
authored
chore(css modules): add content export (#6824)
1 parent f673a56 commit 1e03dc4

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

packages/main/src/components/ActionSheet/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import type {
1717
ResponsivePopoverPropTypes
1818
} from '../../webComponents/index.js';
1919
import { Button, ResponsivePopover } from '../../webComponents/index.js';
20-
import { classNames, styleData } from './ActionSheet.module.css.js';
20+
import { classNames, content } from './ActionSheet.module.css.js';
2121

2222
export interface ActionSheetPropTypes extends Omit<ResponsivePopoverPropTypes, 'header' | 'headerText' | 'children'> {
2323
/**
@@ -119,7 +119,7 @@ const ActionSheet = forwardRef<ResponsivePopoverDomRef, ActionSheetPropTypes>((p
119119
const { accessibilityAttributes, children, className, header, headerText, hideCancelButton, onOpen, open, ...rest } =
120120
props;
121121

122-
useStylesheet(styleData, ActionSheet.displayName);
122+
useStylesheet(content, ActionSheet.displayName);
123123

124124
const i18nBundle = useI18nBundle('@ui5/webcomponents-react');
125125
const actionBtnsRef = useRef(null);

packages/main/src/components/AnalyticalCardHeader/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { flattenFragments } from '../../internal/utils.js';
2020
import type { CommonProps } from '../../types/index.js';
2121
import { Icon } from '../../webComponents/index.js';
2222
import type { NumericSideIndicatorPropTypes } from '../NumericSideIndicator/index.js';
23-
import { classNames, styleData } from './AnalyticalCardHeader.module.css.js';
23+
import { classNames, content } from './AnalyticalCardHeader.module.css.js';
2424

2525
export interface AnalyticalCardHeaderPropTypes extends CommonProps {
2626
/**
@@ -113,7 +113,7 @@ export const AnalyticalCardHeader = forwardRef<HTMLDivElement, AnalyticalCardHea
113113
id,
114114
...rest
115115
} = props;
116-
useStylesheet(styleData, AnalyticalCardHeader.displayName);
116+
useStylesheet(content, AnalyticalCardHeader.displayName);
117117

118118
const headerClasses = clsx(classNames.cardHeader, onClick && classNames.cardHeaderClickable, className);
119119

scripts/postcss-css-to-esm.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const getTSContent = (targetFile, packageName, css, exportTokens) => {
1717
return `export const styleData = \`${css}\`;
1818
1919
export const classNames = ${JSON.stringify(exportTokens)} as const;
20+
export { styleData as content };
2021
`;
2122
};
2223

0 commit comments

Comments
 (0)