fix(code-snippet): showMoreLess={false} should hide button

Fixes #1536

If `showMoreLess` is explicitly `false` for multi-line code snippets, the button should not be shown at all.
This commit is contained in:
Eric Liu 2024-02-24 10:15:45 -08:00 committed by metonym
commit 4085536189
4 changed files with 23 additions and 9 deletions

View file

@ -104,8 +104,10 @@ export interface CodeSnippetProps {
showMoreText?: string;
/**
* Set to `true` to enable the show more/less button
* @default false
* Set to `false` to hide the show more/less button
*
* NOTE: this prop only works with the `type="multi"` variant
* @default true
*/
showMoreLess?: boolean;