@@ -51,6 +51,11 @@ const useStyles = makeStyles({
51
51
display : 'grid' ,
52
52
gridTemplateColumns : '1fr min-content' ,
53
53
} ,
54
+ additionalInfoWrapper : {
55
+ display : 'flex' ,
56
+ flexDirection : 'column' ,
57
+ gap : tokens . spacingVerticalM ,
58
+ } ,
54
59
additionalInfo : {
55
60
display : 'flex' ,
56
61
flexDirection : 'column' ,
@@ -203,43 +208,46 @@ const AdditionalApiDocs: React.FC<{ children: React.ReactElement | React.ReactEl
203
208
} ;
204
209
const RenderArgsTable = ( { hideArgsTable, story } : { story : PrimaryStory ; hideArgsTable : boolean } ) => {
205
210
const { component, hasArgAsProp, hasArgAsSlot, argAsProp } = withSlotEnhancer ( story ) ;
211
+ const styles = useStyles ( ) ;
206
212
207
213
return hideArgsTable ? null : (
208
214
< >
209
- { hasArgAsProp && (
210
- < AdditionalApiDocs >
211
- < p >
212
- < b >
213
- Native props are supported < span role = "presentation" > 🙌</ span >
215
+ < div className = { styles . additionalInfoWrapper } >
216
+ { hasArgAsProp && (
217
+ < AdditionalApiDocs >
218
+ < p >
219
+ < b >
220
+ Native props are supported < span role = "presentation" > 🙌</ span >
221
+ < br />
222
+ </ b >
223
+ < span >
224
+ All HTML attributes native to the
225
+ { getNativeElementsList ( argAsProp ! ) } , including all < code > aria-*</ code > and < code > data-*</ code > { ' ' }
226
+ attributes, can be applied as native props on this component.
227
+ </ span >
228
+ </ p >
229
+ </ AdditionalApiDocs >
230
+ ) }
231
+ { hasArgAsSlot && (
232
+ < AdditionalApiDocs >
233
+ < p >
234
+ < b >
235
+ Customizing components with slots < span role = "presentation" > 🙌</ span >
236
+ </ b >
214
237
< br />
215
- </ b >
216
- < span >
217
- All HTML attributes native to the
218
- { getNativeElementsList ( argAsProp ! ) } , including all < code > aria-*</ code > and < code > data-*</ code > attributes,
219
- can be applied as native props on this component.
220
- </ span >
221
- </ p >
222
- </ AdditionalApiDocs >
223
- ) }
224
- { hasArgAsSlot && (
225
- < AdditionalApiDocs >
226
- < p >
227
- < b >
228
- Customizing components with slots < span role = "presentation" > 🙌</ span >
229
- </ b >
230
- < br />
231
- < span >
232
- Slots in Fluent UI React components are designed to be modified or replaced, providing a flexible approach
233
- to customizing components. Each slot is exposed as a top-level prop and can be filled with primitive
234
- values, JSX/TSX, props objects, or render functions. This allows for more dynamic and reusable component
235
- structures, similar to slots in other frameworks.{ ' ' }
236
- < Link href = "/?path=/docs/concepts-developer-customizing-components-with-slots--docs" >
237
- Customizing components with slots{ ' ' }
238
- </ Link >
239
- </ span >
240
- </ p >
241
- </ AdditionalApiDocs >
242
- ) }
238
+ < span >
239
+ Slots in Fluent UI React components are designed to be modified or replaced, providing a flexible
240
+ approach to customizing components. Each slot is exposed as a top-level prop and can be filled with
241
+ primitive values, JSX/TSX, props objects, or render functions. This allows for more dynamic and reusable
242
+ component structures, similar to slots in other frameworks.{ ' ' }
243
+ < Link href = "/?path=/docs/concepts-developer-customizing-components-with-slots--docs" >
244
+ Customizing components with slots{ ' ' }
245
+ </ Link >
246
+ </ span >
247
+ </ p >
248
+ </ AdditionalApiDocs >
249
+ ) }
250
+ </ div >
243
251
< ArgsTable of = { component } />
244
252
</ >
245
253
) ;
0 commit comments