import type { Meta, StoryObj } from '@storybook/react'; import { CodeCard } from './CodeCard'; const meta: Meta = { title: 'Base/Cards/CodeCard', component: CodeCard, parameters: { layout: 'centered' }, tags: ['autodocs'], decorators: [ (Story) => (
) ] }; export default meta; type Story = StoryObj; const sampleCode = `function helloWorld() { console.log('Hello, World!'); }`; const longCode = `import React from 'react'; import { Button } from 'antd'; export const MyComponent = () => { const handleClick = () => { console.log('Button clicked!'); }; return (

Hello World

); };`; export const Default: Story = { args: { code: sampleCode, language: 'javascript', fileName: 'example.js', className: 'w-[500px] h-[300px]' } }; export const ReadOnly: Story = { args: { code: sampleCode, language: 'javascript', fileName: 'readonly.js', readOnly: true, className: 'w-[500px] h-[300px]' } }; export const LargerEditor: Story = { args: { code: longCode, language: 'typescript', fileName: 'MyComponent.tsx', className: 'w-[600px] h-[400px]' } }; export const NoButtons: Story = { args: { code: sampleCode, language: 'javascript', fileName: 'no-buttons.js', buttons: false, className: 'w-[500px] h-[300px]' } }; export const CustomButtons: Story = { args: { code: sampleCode, language: 'javascript', fileName: 'custom-buttons.js', buttons:
Custom Buttons
, className: 'w-[500px] h-[300px]' } };