mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-23 05:57:05 +02:00
fix: proper collapsing of long element (#5694)
* fix: proper collapsing of long element * Add example * Reorder * Another solution with overflow * Restore original solution
This commit is contained in:
parent
e22170408a
commit
1361a5a38e
2 changed files with 14 additions and 18 deletions
|
@ -22,7 +22,16 @@ module.exports = {
|
|||
{
|
||||
type: 'category',
|
||||
label: 'Huge sidebar category',
|
||||
items: generateHugeSidebarItems(4),
|
||||
items: [
|
||||
...[
|
||||
{
|
||||
type: 'link',
|
||||
href: '/',
|
||||
label: 'Test Test test test test test test',
|
||||
},
|
||||
],
|
||||
...generateHugeSidebarItems(4),
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'link',
|
||||
|
@ -46,8 +55,8 @@ module.exports = {
|
|||
|
||||
function generateHugeSidebarItems() {
|
||||
const maxLevel = 4;
|
||||
const linksCount = 5;
|
||||
const categoriesCount = 5;
|
||||
const linksCount = 8;
|
||||
const categoriesCount = 8;
|
||||
|
||||
function generateRecursive(maxLevel, currentLevel = 0) {
|
||||
if (currentLevel === maxLevel) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue