{"size": 730, "ext": "js", "max_stars_repo_path": "src/OlaIcon.js", "max_stars_repo_name": "marketgoo/Ola-Emails", "max_stars_repo_stars_event_min_datetime": "2021-09-13T21:58:04.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-13T21:58:04.000Z", "max_issues_repo_path": "src/OlaIcon.js", "max_issues_repo_name": "marketgoo/Ola-Emails", "max_issues_repo_issues_event_min_datetime": "2020-04-07T08:17:26.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-25T12:54:58.000Z", "max_forks_repo_path": "src/OlaIcon.js", "max_forks_repo_name": "marketgoo/Ola-Emails", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 13, "max_forks_count": null, "avg_line_length": 29.2, "max_line_length": 149, "alphanum_fraction": 0.4821917808}
const { registerDependencies } = require('mjml-validator');
const { BodyComponent } = require('mjml-core');
const tokens = require('./tokens');

class OlaIcon extends BodyComponent {
    static endingTag = true;

    static allowedAttributes = {
        icon: 'string',
    };

    render() {
        return `
                <table style="margin: auto">
                    <tr>
                        <td style="width:${tokens('size-8')}px" >
                            ${this.renderMJML(`<mj-image align="center" width="${tokens('size-8')}" src="${this.getAttribute('icon')}"></mj-image>`)}
                        <td/>
                    </tr>
                </table>
                `;
    }
}

module.exports = OlaIcon;