Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: union type failed to render since it has examples #245

Merged
merged 1 commit into from
Jan 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import SpacingsStack from '@commercetools-uikit/spacings-stack';
import { apiTypeStrings } from '../../utils/constants';
import Children from './children';

const ChildrenUnionLike = ({ apiType, apiTypeSubTypes }) => {
Expand All @@ -17,6 +18,7 @@ const ChildrenUnionLike = ({ apiType, apiTypeSubTypes }) => {
<Children
apiType={subType}
parentDiscriminator={apiType.discriminator}
strings={apiTypeStrings}
/>
</SpacingsStack>
))}
Expand All @@ -28,7 +30,6 @@ const ChildrenUnionLike = ({ apiType, apiTypeSubTypes }) => {
ChildrenUnionLike.propTypes = {
apiType: PropTypes.object.isRequired,
apiTypeSubTypes: PropTypes.arrayOf(PropTypes.object).isRequired,
strings: PropTypes.object,
};

export default ChildrenUnionLike;
1 change: 0 additions & 1 deletion packages/gatsby-theme-api-docs/src/components/type/type.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const ApiType = props => {
<ChildrenUnionLike
apiType={matchedApiType}
apiTypeSubTypes={apiTypeSubTypes}
strings={apiTypeStrings}
/>
) : (
<Children
Expand Down