File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
docs/src/routes/Home/components Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -109,9 +109,7 @@ function getStyles(categories: Categories): {
109109 const { prefixStyle } = theme ;
110110
111111 return {
112- root : prefixStyle ( {
113- ...style
114- } ) ,
112+ root : prefixStyle ( style ) ,
115113 categories : prefixStyle ( {
116114 width : renderContentWidth ,
117115 display : "flex" ,
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ export default class RenderToBody extends React.Component<RenderToBodyProps> {
1111 rootElm = document . createElement ( "div" ) ;
1212 componentDidMount ( ) {
1313 const { style, className } = this . props ;
14- Object . assign ( this . rootElm , className ? { style, className } : { style } ) ;
14+ Object . assign ( this . rootElm . style , style ) ;
15+ if ( className ) this . rootElm . setAttribute ( "class" , className ) ;
1516
1617 document . body . appendChild ( this . rootElm ) ;
1718 this . renderComponent ( ) ;
@@ -20,7 +21,8 @@ export default class RenderToBody extends React.Component<RenderToBodyProps> {
2021 componentDidUpdate ( ) {
2122 this . renderComponent ( ) ;
2223 const { style, className } = this . props ;
23- Object . assign ( this . rootElm , className ? { style, className } : { style } ) ;
24+ Object . assign ( this . rootElm . style , style ) ;
25+ if ( className ) this . rootElm . setAttribute ( "class" , className ) ;
2426 }
2527
2628 componentWillUnmount ( ) {
You can’t perform that action at this time.
0 commit comments