diff --git a/src/JSONNode.scss b/src/JSONNode.scss index 68df794..c2dd531 100644 --- a/src/JSONNode.scss +++ b/src/JSONNode.scss @@ -124,6 +124,24 @@ } } +div.limit { + margin-left: $indentation-width; + + button { + background: none; + border: none; + padding: 0; + color: $black; + text-decoration: underline; + cursor: pointer; + + &:hover, + &:focus { + color: $red; + } + } +} + div.empty { &:not(:focus) { outline: 1px dotted lightgray; diff --git a/src/JSONNode.svelte b/src/JSONNode.svelte index 1b5c1d5..6ddab14 100644 --- a/src/JSONNode.svelte +++ b/src/JSONNode.svelte @@ -178,6 +178,10 @@ function handleShowAll () { onLimit(path, Infinity) } + + function handleShowMore () { + onLimit(path, (Math.round(limit / DEFAULT_LIMIT) + 1) * DEFAULT_LIMIT) + }