Skip to content

Commit

Permalink
docs: Render type parameters in external SymbolDoc symbols
Browse files Browse the repository at this point in the history
The external `SymbolDoc` type did not render type parameters:

```ts
Record<string, number>
```

This fix updates the external symbol type to include the type parameters.
  • Loading branch information
NicholasBoll authored Sep 18, 2023
1 parent 76e356d commit 64550bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/docs/lib/widgets/external.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import React from 'react';
import {ExternalHyperlink} from '@workday/canvas-kit-react/button';

import {renderTypeParameters} from '../widgetUtils';
import {ExternalSymbolValue} from '../../docgen/docTypes';

import {registerWidget} from '../Value';

registerWidget<ExternalSymbolValue>('external', ({value}) => (
<ExternalHyperlink href={value.url}>{value.name}</ExternalHyperlink>
<>
<ExternalHyperlink href={value.url}>{value.name}</ExternalHyperlink>
{renderTypeParameters(value.typeParameters)}
</>
));

0 comments on commit 64550bd

Please sign in to comment.