This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import customFontGlyph from '../../assets/font/custom-font-icon.json'; | |
import { createIconSet } from 'react-native-vector-icons'; | |
export default createIconSet(customFontGlyph, 'custom-font-icon', 'custom-font-icon.ttf'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Icon from './Icon'; | |
export const Louvre = props => <Icon {...props} name="001-louvre" />; | |
export const LeaningTowerOfPisa = props => <Icon {...props} name="002-leaning tower of pisa" />; | |
export const Coliseum = props => <Icon {...props} name="003-coliseum" />; | |
export const Stonehenge = props => <Icon {...props} name="004-stonehenge" />; | |
// and the list continue ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { execSync } = require('child_process'); | |
const fs = require('fs'); | |
const toPascalCase = string => | |
string | |
.match(/[a-z]+/gi) | |
.map(word => word.charAt(0).toUpperCase() + word.substr(1).toLowerCase()) | |
.join(''); | |
console.log('Ready to generate RN icon font ⏰'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// App.js | |
import React from 'react'; | |
import { ThemeProvider } from 'styled-components'; | |
import MyApp from 'src/MyApp'; | |
const theme = { | |
button: { | |
color: 'white', | |
background: 'coral', |
NewerOlder