Skip to content

chore(css modules): add content export #6824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/main/src/components/ActionSheet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import type {
ResponsivePopoverPropTypes
} from '../../webComponents/index.js';
import { Button, ResponsivePopover } from '../../webComponents/index.js';
import { classNames, styleData } from './ActionSheet.module.css.js';
import { classNames, content } from './ActionSheet.module.css.js';

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

useStylesheet(styleData, ActionSheet.displayName);
useStylesheet(content, ActionSheet.displayName);

const i18nBundle = useI18nBundle('@ui5/webcomponents-react');
const actionBtnsRef = useRef(null);
Expand Down
4 changes: 2 additions & 2 deletions packages/main/src/components/AnalyticalCardHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { flattenFragments } from '../../internal/utils.js';
import type { CommonProps } from '../../types/index.js';
import { Icon } from '../../webComponents/index.js';
import type { NumericSideIndicatorPropTypes } from '../NumericSideIndicator/index.js';
import { classNames, styleData } from './AnalyticalCardHeader.module.css.js';
import { classNames, content } from './AnalyticalCardHeader.module.css.js';

export interface AnalyticalCardHeaderPropTypes extends CommonProps {
/**
Expand Down Expand Up @@ -113,7 +113,7 @@ export const AnalyticalCardHeader = forwardRef<HTMLDivElement, AnalyticalCardHea
id,
...rest
} = props;
useStylesheet(styleData, AnalyticalCardHeader.displayName);
useStylesheet(content, AnalyticalCardHeader.displayName);

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

Expand Down
1 change: 1 addition & 0 deletions scripts/postcss-css-to-esm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const getTSContent = (targetFile, packageName, css, exportTokens) => {
return `export const styleData = \`${css}\`;

export const classNames = ${JSON.stringify(exportTokens)} as const;
export { styleData as content };
`;
};

Expand Down
Loading