1import { CodeBlock } from "passport-ui";
1const sampleCode = `function greet(name) {2 console.log(`Hello, ${name}!`);3}`;4 5<CodeBlock code={sampleCode} language="javascript" />;
A component for displaying formatted code with syntax highlighting.
Import the component from the passport-ui package.
1import { CodeBlock } from "passport-ui";
Basic example showing how to use the component.
1const sampleCode = `function greet(name) {2 console.log(`Hello, ${name}!`);3}`;4 5<CodeBlock code={sampleCode} language="javascript" />;
Documentation and examples are available in Storybook.