Skip to content

Commit 1c8a870

Browse files
author
Jacob Logan
committed
update api function returns to use typeParameters
1 parent bccb11f commit 1c8a870

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/components/ApiDocs/FunctionReturn.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { MDXHeading } from '../MDXComponents';
33
import { Promise } from './display/Promise';
44
import { ApiComment } from './ApiComment';
55
import references from '@/directory/apiReferences.json';
6+
import { ParameterType } from './display';
67

78
export const FunctionReturn = ({ functionReturn, sigName }) => {
89
const name = functionReturn.name;
@@ -15,7 +16,7 @@ export const FunctionReturn = ({ functionReturn, sigName }) => {
1516
}
1617
} else {
1718
const returnType = references[functionReturn.target];
18-
display = name;
19+
display = <ParameterType typeData={functionReturn} />;
1920
if (returnType?.comment?.summary) {
2021
description = <ApiComment apiComment={returnType.comment.summary} />;
2122
}

src/components/ApiDocs/display/ApiModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export const ApiModal = ({
117117
* viewports.
118118
*/}
119119
<dd
120-
className="api-modal__api-value"
120+
className="api-modal__api-value api-modal__content__value"
121121
tabIndex={data.type?.type === 'reference' ? -1 : 0}
122122
>
123123
<View as="code" className="parameter">

src/styles/reference.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
font-weight: bold;
6868
align-items: baseline;
6969
}
70-
&__description {
70+
&__description, &__value {
7171
color: var(--amplify-colors-neutral-90);
7272
}
7373
}

0 commit comments

Comments
 (0)