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