Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The way to use ionicons demand load in React #611

Closed
ShanaMaid opened this issue Sep 19, 2018 · 1 comment
Closed

The way to use ionicons demand load in React #611

ShanaMaid opened this issue Sep 19, 2018 · 1 comment

Comments

@ShanaMaid
Copy link

<script src="https://unpkg.com/ionicons@4.4.2/dist/ionicons.js"></script>

import * as React from 'react';
import { Component } from 'react';
import 'ionicons/dist/ionicons.js';

export default class Index extends Component {
  render() {
    const html = '<ion-icon name="ios-heart"></ion-icon>';
    return (
      <div className=''>
        <i dangerouslySetInnerHTML={{__html: html}}/>
      </div>
    );
  }
}

it not work

@ShanaMaid
Copy link
Author

I find a way to solve this issue。
https://github.com/Yoshino-UI/Yoshino/blob/master/components/Icon/Icon.tsx#L26
thanks

@ShanaMaid ShanaMaid changed the title how to use ionicons demand load in React? The way to use ionicons demand load in React Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant