1- // TODO: [P2] This component can be replaced by `bindProps(InjectCSS)({ cssContent, identifier }) `.
1+ // TODO: [P2] This component can be replaced by `bindProps`.
22import { InjectStyleElements } from '@msinternal/botframework-webchat-component-inject-style-elements' ;
33import { validateProps } from '@msinternal/botframework-webchat-react-valibot' ;
44import { useStyleOptions } from 'botframework-webchat-api/hook' ;
@@ -7,27 +7,27 @@ import { never, object, optional, pipe, readonly, string, undefinedable, type In
77
88import 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
2020const 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 } ;
0 commit comments