@wallarm-org/design-system 0.2.0-rc-feat-code-snippet-actions.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -11,7 +11,7 @@ export type CodeSnippetRootProps<TLanguage extends string = string> = CodeSnippe
|
|
|
11
11
|
/** The code string to display */
|
|
12
12
|
code: string;
|
|
13
13
|
/** Programming language for syntax highlighting */
|
|
14
|
-
language
|
|
14
|
+
language?: TLanguage;
|
|
15
15
|
/** Per-line configuration (color, prefix) keyed by line number */
|
|
16
16
|
lines?: Record<number, LineConfig>;
|
|
17
17
|
/** Starting line number (default: 1) */
|
|
@@ -19,7 +19,7 @@ const codeSnippetRootVariants = cva("relative bg-component-code-snippet-bg round
|
|
|
19
19
|
size: 'md'
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
const CodeSnippetRoot = ({ code, language, size = 'md', lines = {}, startingLineNumber = 1, wrapLines: initialWrapLines = false, maxLines = 0, onCopy, className, children, ...props })=>{
|
|
22
|
+
const CodeSnippetRoot = ({ code, language = 'text', size = 'md', lines = {}, startingLineNumber = 1, wrapLines: initialWrapLines = false, maxLines = 0, onCopy, className, children, ...props })=>{
|
|
23
23
|
const adapterContext = useAdapter();
|
|
24
24
|
const [wrapLines, setWrapLines] = useState(initialWrapLines);
|
|
25
25
|
const [isExpanded, setIsExpanded] = useState(false);
|
package/package.json
CHANGED