import * as CodeBlock from '../app/components/CodeBlock'; import type { Meta } from '@storybook/react'; import { forwardRef } from 'react'; import { twMerge } from 'tailwind-merge'; import type { ElementRef } from 'react'; type CodeBlockExampleProps = CodeBlock.RootProps; export const CodeBlockExample = forwardRef, CodeBlockExampleProps>( function CodeBlockExample({ className, ...other }, forwardedRef) { const codeString = `curl --location --request GET 'https://api.0x.org/swap/v1/quote?buyToken=DAI&sellToken=ETH&sellAmount=100000&excludedSources=0x,Kyber' --header '0x-api-key: [api-key]'`; return (
CURL REQUEST
{codeString}
); }, ); const meta = { title: 'Components/CodeBlock', component: CodeBlockExample, // tags: ['autodocs'], react-syntax-highlighter does not want to work with autodocs argTypes: {}, } satisfies Meta; export default meta;