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

feat: implement variable support #23

Merged
merged 10 commits into from
Sep 16, 2024
Merged

feat: implement variable support #23

merged 10 commits into from
Sep 16, 2024

Conversation

oktaysenkan
Copy link
Owner

@oktaysenkan oktaysenkan commented Aug 1, 2024

Usage

import * as React from 'react';

import { StyleSheet, View } from 'react-native';
import { Iconify } from 'react-native-iconify';

// @@iconify-code-gen

const icons = ['mdi:heart', 'mdi:home', 'feather:activity'];

export default function App() {
  return (
    <View>
      {icons.map((icon, index) => (
        <Iconify key={index} icon={icon} color="black" />
      ))}
    </View>
  );
}

babel.config.js

module.exports = {
  presets: [
    ...
  ],
  plugins: [
    ...
    'react-native-iconify/plugin',
    {
      icons: [
        'mdi:heart',
        'mdi:home',
        'feather:activity',
        // other icons
      ],
    },
  ],
};

@oktaysenkan oktaysenkan merged commit 1b4f890 into main Sep 16, 2024
4 checks passed
@oktaysenkan oktaysenkan deleted the feat/variable-support branch October 2, 2024 14:02
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

Successfully merging this pull request may close these issues.

1 participant