mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
use public class function (#4859)
This commit is contained in:
parent
5158abb108
commit
dcdc429b9b
@ -7,14 +7,16 @@ interface Props {
|
||||
type: GraphQLEnumType;
|
||||
}
|
||||
|
||||
export const GraphQLExplorerEnum: FC<Props> = ({ type: { description, getValues } }) => {
|
||||
export const GraphQLExplorerEnum: FC<Props> = ({ type }) => {
|
||||
const values = type.getValues();
|
||||
|
||||
return (
|
||||
<div className="graphql-explorer__type">
|
||||
<MarkdownPreview markdown={description || '*no description*'} />
|
||||
<MarkdownPreview markdown={type.description || '*no description*'} />
|
||||
|
||||
<h2 className="graphql-explorer__subheading">Values</h2>
|
||||
<ul className="graphql-explorer__defs">
|
||||
{getValues().map(value => (
|
||||
{values.map(value => (
|
||||
<li key={value.name}>
|
||||
<span className="selectable bold">{value.name}</span>
|
||||
<div className="graphql-explorer__defs__description">
|
||||
|
Loading…
Reference in New Issue
Block a user