Skip to content

Commit f8d982e

Browse files
authored
fix(public-docsite-v9): add spacing between additional info section items (#34281)
1 parent 6e2dc68 commit f8d982e

File tree

1 file changed

+41
-33
lines changed

1 file changed

+41
-33
lines changed

apps/public-docsite-v9/src/DocsComponents/FluentDocsPage.stories.tsx

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ const useStyles = makeStyles({
5151
display: 'grid',
5252
gridTemplateColumns: '1fr min-content',
5353
},
54+
additionalInfoWrapper: {
55+
display: 'flex',
56+
flexDirection: 'column',
57+
gap: tokens.spacingVerticalM,
58+
},
5459
additionalInfo: {
5560
display: 'flex',
5661
flexDirection: 'column',
@@ -203,43 +208,46 @@ const AdditionalApiDocs: React.FC<{ children: React.ReactElement | React.ReactEl
203208
};
204209
const RenderArgsTable = ({ hideArgsTable, story }: { story: PrimaryStory; hideArgsTable: boolean }) => {
205210
const { component, hasArgAsProp, hasArgAsSlot, argAsProp } = withSlotEnhancer(story);
211+
const styles = useStyles();
206212

207213
return hideArgsTable ? null : (
208214
<>
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>
214237
<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>
243251
<ArgsTable of={component} />
244252
</>
245253
);

0 commit comments

Comments
 (0)