Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/Code/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const Code: React.FC<Props> = (props) => {
classes.codeWrap,
disableMinHeight && classes.disableMinHeight,
parentClassName && parentClassName,
'code-block-wrap',
]
.filter(Boolean)
.join(' ')}
Expand Down
4 changes: 2 additions & 2 deletions src/components/DocsNavigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ export const DocsNavigation = ({
</div>
)}
<Accordion.Root
defaultValue={[...openTopicPreferences, currentTopic]}
defaultValue={currentTopic}
onValueChange={(value) =>
window.localStorage.setItem(openTopicsLocalStorageKey, JSON.stringify(value))
}
type="multiple"
type="single"
Comment on lines +146 to +150
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now doesn't allow all sections to be closed. If one is open, it can't be closed.
Additionally, onChange needs to be modified so that localStorage clears up and stores only one section as expanded. Otherwise, when you refresh the page, the expanded section isn't the last one you expanded.

>
{topics.map((tGroup, groupIndex) => (
<Fragment key={`group-${groupIndex}`}>
Expand Down
4 changes: 4 additions & 0 deletions src/components/RichText/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
white-space: pre-wrap;
}

.code-block-wrap span {
white-space: unset;
}

.lexical-table-container {
overflow: auto;
margin-bottom: 2rem;
Expand Down