open-index/open-npm huggingface dataset:
npm package: @pratikkamble199/email-editor
Description: A React email editor component built with TypeScript and Material-UI
Author: Pratik Kamble
Latest version: 0.2.6

# Email Editor Library

A flexible and customizable email editor component for React applications.

## Installation

```bash
npm install @yourusername/email-editor
# or
yarn add @yourusername/email-editor
```

## Peer Dependencies

This library requires the following peer dependencies:

- react (>=16.8.0)
- react-dom (>=16.8.0)
- @mui/material (>=5.0.0)
- @emotion/react (>=11.0.0)
- @emotion/styled (>=11.0.0)

## Usage

```jsx
import React from 'react';
import { EmailEditor } from '@yourusername/email-editor';

function App() {
  const handleTemplateChange = (template) => {
    console.log('Template updated:', template);
  };

  return (
    <div style={{ height: '100vh' }}>
      <EmailEditor 
        onTemplateChange={handleTemplateChange}
        initialTemplate={{}}
      />
    </div>
  );
}

export default App;
```

## Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `initialTemplate` | `object` | `{}` | Initial email template data |
| `onTemplateChange` | `(template: object) => void` | `undefined` | Callback when the template is updated |
| `components` | `object` | `{}` | Custom components to override default editor components |
| `className` | `string` | `''` | Additional class name for the editor container |
| `style` | `React.CSSProperties` | `{}` | Additional styles for the editor container |

## Development

1. Clone the repository
2. Install dependencies:
   ```bash
   npm install
   ```
3. Start development server:
   ```bash
   npm run dev
   ```
4. Build the library:
   ```bash
   npm run build
   ```

## License

MIT