Skip to content

Commit 12b1819

Browse files
committed
Add labels for individual i18nStrings.
1 parent 5da7710 commit 12b1819

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/__tests__/__snapshots__/documenter.test.ts.snap

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ exports[`definition for 'code-view' matches the snapshot 1`] = `
4343
"type": "((code: string) => React.ReactNode)",
4444
},
4545
{
46-
"description": "An object containing all the necessary localized strings required by the component.",
46+
"description": "An object containing all the necessary localized strings required by the component. The object should contain:
47+
48+
* \`lineNumberLabel\` - Label for the column that displays line numbers (when line numbers are visible)
49+
* \`codeLabel\` - Label for the column that displays the code content (when line numbers are visible)",
4750
"inlineType": {
4851
"name": "CodeViewProps.I18nStrings",
4952
"properties": [

src/code-view/interfaces.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ export interface CodeViewProps {
4343
highlight?: (code: string) => React.ReactNode;
4444

4545
/**
46-
* An object containing all the necessary localized strings required by the component.
46+
* An object containing all the necessary localized strings required by the component. The object should contain:
47+
*
48+
* * `lineNumberLabel` - Label for the column that displays line numbers (when line numbers are visible)
49+
* * `codeLabel` - Label for the column that displays the code content (when line numbers are visible)
4750
*/
4851
i18nStrings?: CodeViewProps.I18nStrings;
4952
}

0 commit comments

Comments
 (0)