react-graphql-syntax-highlighter
v0.1.0
Published
A React component for highlighting GraphQL syntax.
Readme
GraphQL syntax highlighting React component
Installation
yarn add react-graphql-syntax-highlighterExample usage
import { GraphQLCodeBlock } from 'react-graphql-syntax-highlighter';
import 'react-graphql-syntax-highlighter/style.css';
const MyComponent = ({ code }: { code: string }) => (
<GraphQLCodeBlock src={code} />
);The component takes two props: className and src. src is a GraphQL query string.
