@@ -10,18 +10,19 @@ import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment';
1010
1111interface CloudProps {
1212 darkMode ?: boolean ;
13+ style ?: CSSProperties ;
14+ className ?: string ;
1315}
1416
1517// Old icon slides out to the RIGHT; new icon slides in from the LEFT
16- export const Cloud : FC < CloudProps > = ( { darkMode = false } ) => {
18+ export const Cloud : FC < CloudProps > = ( { darkMode = false , style , className } ) => {
1719 const [ , setIconIndex ] = useState ( 0 ) ;
1820 const [ currentUrl , setCurrentUrl ] = useState < string > ( replicationLinks [ 0 ] . iconUrl ) ;
1921 const [ prevUrl , setPrevUrl ] = useState < string | undefined > ( undefined ) ;
2022
2123 const prevRef = useRef < HTMLImageElement | null > ( null ) ;
2224 const currRef = useRef < HTMLImageElement | null > ( null ) ;
2325
24-
2526 // Handle "heartbeat": advance to next icon and trigger slide transition
2627 useEffect ( ( ) => {
2728 if ( ! ExecutionEnvironment . canUseDOM ) {
@@ -74,6 +75,7 @@ export const Cloud: FC<CloudProps> = ({ darkMode = false }) => {
7475 alignItems : 'center' ,
7576 justifyContent : 'center' ,
7677 borderRadius : 12 ,
78+ ...style , // merge custom style
7779 } ;
7880
7981 const badgeStyle : CSSProperties = {
@@ -87,8 +89,8 @@ export const Cloud: FC<CloudProps> = ({ darkMode = false }) => {
8789 const circleBorder : string = darkMode ? 'var(--bg-color-dark)' : 'var(--bg-color)' ;
8890
8991 const badgeInnerStyle : CSSProperties = {
90- width : 'clamp(10px, 8vw, 56px) ' ,
91- height : 'clamp(10px, 8vw, 56px) ' ,
92+ width : '56px' ,
93+ height : '56px' ,
9294 background : circleColor ,
9395 borderRadius : '50%' ,
9496 display : 'flex' ,
@@ -109,7 +111,7 @@ export const Cloud: FC<CloudProps> = ({ darkMode = false }) => {
109111 } ;
110112
111113 return (
112- < div style = { wrapperStyle } >
114+ < div style = { wrapperStyle } className = { className } >
113115 < svg
114116 xmlns = "http://www.w3.org/2000/svg"
115117 width = "126"
0 commit comments