Skip to content

Commit ae1c734

Browse files
committed
Rename *CSS -> *Stylesheet
1 parent 75ddff7 commit ae1c734

4 files changed

Lines changed: 20 additions & 20 deletions

File tree

packages/component/src/Composer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ import createDefaultSendBoxMiddleware from './SendBox/createMiddleware';
5050
import createDefaultSendBoxToolbarMiddleware from './SendBoxToolbar/createMiddleware';
5151
import createStyleSet from './Styles/createStyleSet';
5252
import CustomPropertiesContainer from './Styles/CustomPropertiesContainer';
53-
import ComponentCSS from './stylesheet/ComponentCSS';
53+
import ComponentStylesheet from './stylesheet/ComponentStylesheet';
5454
import { type ContextOf } from './types/ContextOf';
5555
import { type FocusTranscriptInit } from './types/internal/FocusTranscriptInit';
5656
import addTargetBlankToHyperlinksMarkdown from './Utils/addTargetBlankToHyperlinksMarkdown';
@@ -459,7 +459,7 @@ const Composer = ({
459459
typingIndicatorMiddleware={patchedTypingIndicatorMiddleware}
460460
{...composerProps}
461461
>
462-
<ComponentCSS nonce={nonce} />
462+
<ComponentStylesheet nonce={nonce} />
463463
<StyleToEmotionObjectComposer nonce={nonce}>
464464
<HTMLContentTransformComposer middleware={htmlContentTransformMiddleware}>
465465
<ReducedMotionComposer>

packages/component/src/decorator/private/WebChatDecorator.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
import React, { Fragment, memo } from 'react';
99
import { object, optional, pipe, readonly, string, type InferInput } from 'valibot';
1010

11-
import DecoratorCSS from '../stylesheet/DecoratorCSS';
11+
import DecoratorStylesheet from '../stylesheet/DecoratorStylesheet';
1212
import BorderFlair from './BorderFlair';
1313
import BorderLoader from './BorderLoader';
1414

@@ -44,7 +44,7 @@ function WebChatDecorator(props: WebChatDecoratorProps) {
4444

4545
return (
4646
<Fragment>
47-
<DecoratorCSS nonce={nonce} />
47+
<DecoratorStylesheet nonce={nonce} />
4848
<DecoratorComposer middleware={middleware}>{children}</DecoratorComposer>
4949
</Fragment>
5050
);

packages/component/src/decorator/stylesheet/DecoratorCSS.tsx renamed to packages/component/src/decorator/stylesheet/DecoratorStylesheet.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// TODO: [P2] This component can be replaced by `bindProps(InjectCSS)({ cssContent, identifier })`.
1+
// TODO: [P2] This component can be replaced by `bindProps`.
22
import { InjectStyleElements } from '@msinternal/botframework-webchat-component-inject-style-elements';
33
import { validateProps } from '@msinternal/botframework-webchat-react-valibot';
44
import { useStyleOptions } from 'botframework-webchat-api/hook';
@@ -7,27 +7,27 @@ import { never, object, optional, pipe, readonly, string, undefinedable, type In
77

88
import createDecoratorStyleElements from './createDecoratorStyleElements';
99

10-
const decoratorCSSPropsSchema = pipe(
10+
const decoratorStylesheetPropsSchema = pipe(
1111
object({
1212
children: optional(never()),
1313
nonce: undefinedable(string())
1414
}),
1515
readonly()
1616
);
1717

18-
type DecoratorCSSProps = InferInput<typeof decoratorCSSPropsSchema>;
18+
type DecoratorStylesheetProps = InferInput<typeof decoratorStylesheetPropsSchema>;
1919

2020
const styleElements = createDecoratorStyleElements('component/decorator');
2121

22-
function DecoratorCSS(props: DecoratorCSSProps) {
23-
const { nonce } = validateProps(decoratorCSSPropsSchema, props);
22+
function DecoratorStylesheet(props: DecoratorStylesheetProps) {
23+
const { nonce } = validateProps(decoratorStylesheetPropsSchema, props);
2424

2525
const [{ stylesRoot }] = useStyleOptions();
2626

2727
return <InjectStyleElements at={stylesRoot} nonce={nonce} styleElements={styleElements} />;
2828
}
2929

30-
DecoratorCSS.displayName = 'DecoratorCSS';
30+
DecoratorStylesheet.displayName = 'DecoratorStylesheet';
3131

32-
export default memo(DecoratorCSS as FunctionComponent<DecoratorCSSProps>);
33-
export { decoratorCSSPropsSchema, type DecoratorCSSProps };
32+
export default memo(DecoratorStylesheet as FunctionComponent<DecoratorStylesheetProps>);
33+
export { decoratorStylesheetPropsSchema, type DecoratorStylesheetProps };

packages/component/src/stylesheet/ComponentCSS.tsx renamed to packages/component/src/stylesheet/ComponentStylesheet.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// TODO: [P2] This component can be replaced by `bindProps(InjectCSS)({ cssContent, identifier })`.
1+
// TODO: [P2] This component can be replaced by `bindProps`.
22
import { InjectStyleElements } from '@msinternal/botframework-webchat-component-inject-style-elements';
33
import { validateProps } from '@msinternal/botframework-webchat-react-valibot';
44
import { useStyleOptions } from 'botframework-webchat-api/hook';
@@ -7,27 +7,27 @@ import { never, object, optional, pipe, readonly, string, undefinedable, type In
77

88
import createComponentStyleElements from './createComponentStyleElements';
99

10-
const componentCSSPropsSchema = pipe(
10+
const componentStylesheetPropsSchema = pipe(
1111
object({
1212
children: optional(never()),
1313
nonce: undefinedable(string())
1414
}),
1515
readonly()
1616
);
1717

18-
type ComponentCSSProps = InferInput<typeof componentCSSPropsSchema>;
18+
type ComponentStylesheetProps = InferInput<typeof componentStylesheetPropsSchema>;
1919

2020
const styleElements = createComponentStyleElements('component');
2121

22-
function ComponentCSS(props: ComponentCSSProps) {
23-
const { nonce } = validateProps(componentCSSPropsSchema, props);
22+
function ComponentStylesheet(props: ComponentStylesheetProps) {
23+
const { nonce } = validateProps(componentStylesheetPropsSchema, props);
2424

2525
const [{ stylesRoot }] = useStyleOptions();
2626

2727
return <InjectStyleElements at={stylesRoot} nonce={nonce} styleElements={styleElements} />;
2828
}
2929

30-
ComponentCSS.displayName = 'ComponentCSS';
30+
ComponentStylesheet.displayName = 'ComponentStylesheet';
3131

32-
export default memo(ComponentCSS as FunctionComponent<ComponentCSSProps>);
33-
export { componentCSSPropsSchema, type ComponentCSSProps };
32+
export default memo(ComponentStylesheet as FunctionComponent<ComponentStylesheetProps>);
33+
export { componentStylesheetPropsSchema, type ComponentStylesheetProps };

0 commit comments

Comments
 (0)