Skip to content

Commit 838e7ad

Browse files
andgen404jorytindall
authored andcommitted
Apply suggestions from code review
Co-authored-by: Jory Tindall <[email protected]>
1 parent a00cb3c commit 838e7ad

File tree

1 file changed

+1
-3
lines changed
  • website/docs/components/code-block/partials/guidelines

1 file changed

+1
-3
lines changed

website/docs/components/code-block/partials/guidelines/guidelines.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,9 @@ In the Figma component, the code examples have the appropriate number of lines b
7171

7272
## Height toggle button
7373

74-
When displaying longer code snippets, it can be helpful to let users expand and collapse the content. Setting a `maxHeight` on the Code Block limits how much is shown by default. If the content exceeds this height, a **Show more code** button appears at the bottom of the block, allowing users to expand it. Clicking again collapses it back.
74+
When displaying longer code snippets, it can be helpful to let users expand and collapse the content. Setting a `maxHeight` on the Code Block limits how much is shown by default. If the content exceeds this height, a **Show more code** button appears at the bottom of the block, allowing users to expand it. Interacting with the button again collapses it to it's original height.
7575

7676
In Figma, this is enabled by setting `hasToggleHeightButton` to true.
77-
7877
The button is placed inside a footer element that only appears when the content overflows, keeping the layout clean when the toggle isn’t needed.
7978

8079
![Collapsed Code Block showing limited lines and a 'Show more code' button at the bottom.](/assets/components/code-block/code-block-collapsed.png)
@@ -85,7 +84,6 @@ Interacting with this button removes the height limit, expanding the Code Block
8584

8685
Interacting with it again collapses the Code Block back to its set `maxHeight`.
8786

88-
The button is placed inside a footer element that only appears when `maxHeight` is set and the content overflows. This keeps the layout clean when the toggle isn’t needed.
8987

9088
## Line highlighting
9189

0 commit comments

Comments
 (0)