File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,12 @@ height and width MUST be defined ON SERVER component to prevent layout shift
113
113
----
114
114
img srcset
115
115
copy hooks for width for page size and observer form react - use or usehooks
116
+
117
+ --------
118
+ fora0 : cant pass props from client component to child server component - slot (astro Image component )
119
+ fora1 : margin collapsing disabled in flex , grid , mdx container
120
+ fora2 : client component size must be set in server component to prevent layout shift (flex or height and max - height )
121
+ fora3 : px suffix for style = {{width , height }} in react
116
122
```
117
123
118
124
Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ const { width, height } = Object.fromEntries(
17
17
{ /* height and width MUST be defined ON SERVER component to prevent layout shift */ }
18
18
{ /* set height and width to image size but set real size with max-height and max-width */ }
19
19
20
- <div class ={ cn (' max-w-full max-h-96 my-8' , className )} style ={ { width , height }} {... props }>
20
+ <div
21
+ class ={ cn (' max-w-full max-h-64 md:max-h-96 my-8' , className )}
22
+ style ={ { width , height }}
23
+ {... props }
24
+ >
21
25
<ImageRandomReact {galleryImages } client:load />
22
26
</div >
You can’t perform that action at this time.
0 commit comments