mirror of
https://github.com/zoriya/expo-vector-icons.git
synced 2026-06-06 11:52:37 +00:00
Run prettier 1.7 with 100-col on libraries
Used the latest prettier with 100-col config on most libraries except expo-sdk and snack-sdk. Will do those individually and later. fbshipit-source-id: 79cf6a6
This commit is contained in:
committed by
Exponent GitHub Bot
parent
f454f6459f
commit
797a8141db
+2
-7
@@ -1,9 +1,4 @@
|
||||
import glyphMap
|
||||
from './vendor/react-native-vector-icons/glyphmaps/EvilIcons.json';
|
||||
import glyphMap from './vendor/react-native-vector-icons/glyphmaps/EvilIcons.json';
|
||||
import createIconSet from './createIconSet';
|
||||
|
||||
export default createIconSet(
|
||||
glyphMap,
|
||||
'evilicons',
|
||||
require('./fonts/EvilIcons.ttf')
|
||||
);
|
||||
export default createIconSet(glyphMap, 'evilicons', require('./fonts/EvilIcons.ttf'));
|
||||
|
||||
+1
-5
@@ -1,8 +1,4 @@
|
||||
import glyphMap from './vendor/react-native-vector-icons/glyphmaps/Feather.json';
|
||||
import createIconSet from './createIconSet';
|
||||
|
||||
export default createIconSet(
|
||||
glyphMap,
|
||||
'feather',
|
||||
require('./fonts/Feather.ttf')
|
||||
);
|
||||
export default createIconSet(glyphMap, 'feather', require('./fonts/Feather.ttf'));
|
||||
|
||||
+2
-7
@@ -1,9 +1,4 @@
|
||||
import glyphMap
|
||||
from './vendor/react-native-vector-icons/glyphmaps/FontAwesome.json';
|
||||
import glyphMap from './vendor/react-native-vector-icons/glyphmaps/FontAwesome.json';
|
||||
import createIconSet from './createIconSet';
|
||||
|
||||
export default createIconSet(
|
||||
glyphMap,
|
||||
'awesome',
|
||||
require('./fonts/FontAwesome.ttf')
|
||||
);
|
||||
export default createIconSet(glyphMap, 'awesome', require('./fonts/FontAwesome.ttf'));
|
||||
|
||||
+2
-7
@@ -1,9 +1,4 @@
|
||||
import glyphMap
|
||||
from './vendor/react-native-vector-icons/glyphmaps/Foundation.json';
|
||||
import glyphMap from './vendor/react-native-vector-icons/glyphmaps/Foundation.json';
|
||||
import createIconSet from './createIconSet';
|
||||
|
||||
export default createIconSet(
|
||||
glyphMap,
|
||||
'foundation',
|
||||
require('./fonts/Foundation.ttf')
|
||||
);
|
||||
export default createIconSet(glyphMap, 'foundation', require('./fonts/Foundation.ttf'));
|
||||
|
||||
+2
-7
@@ -1,9 +1,4 @@
|
||||
import glyphMap
|
||||
from './vendor/react-native-vector-icons/glyphmaps/Ionicons.json';
|
||||
import glyphMap from './vendor/react-native-vector-icons/glyphmaps/Ionicons.json';
|
||||
import createIconSet from './createIconSet';
|
||||
|
||||
export default createIconSet(
|
||||
glyphMap,
|
||||
'ionicons',
|
||||
require('./fonts/Ionicons.ttf')
|
||||
);
|
||||
export default createIconSet(glyphMap, 'ionicons', require('./fonts/Ionicons.ttf'));
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import glyphMap
|
||||
from './vendor/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json';
|
||||
import glyphMap from './vendor/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json';
|
||||
import createIconSet from './createIconSet';
|
||||
|
||||
export default createIconSet(
|
||||
|
||||
+2
-7
@@ -1,9 +1,4 @@
|
||||
import glyphMap
|
||||
from './vendor/react-native-vector-icons/glyphmaps/MaterialIcons.json';
|
||||
import glyphMap from './vendor/react-native-vector-icons/glyphmaps/MaterialIcons.json';
|
||||
import createIconSet from './createIconSet';
|
||||
|
||||
export default createIconSet(
|
||||
glyphMap,
|
||||
'material',
|
||||
require('./fonts/MaterialIcons.ttf')
|
||||
);
|
||||
export default createIconSet(glyphMap, 'material', require('./fonts/MaterialIcons.ttf'));
|
||||
|
||||
+2
-7
@@ -1,9 +1,4 @@
|
||||
import glyphMap
|
||||
from './vendor/react-native-vector-icons/glyphmaps/Octicons.json';
|
||||
import glyphMap from './vendor/react-native-vector-icons/glyphmaps/Octicons.json';
|
||||
import createIconSet from './createIconSet';
|
||||
|
||||
export default createIconSet(
|
||||
glyphMap,
|
||||
'octicons',
|
||||
require('./fonts/Octicons.ttf')
|
||||
);
|
||||
export default createIconSet(glyphMap, 'octicons', require('./fonts/Octicons.ttf'));
|
||||
|
||||
+2
-7
@@ -1,9 +1,4 @@
|
||||
import glyphMap
|
||||
from './vendor/react-native-vector-icons/glyphmaps/SimpleLineIcons.json';
|
||||
import glyphMap from './vendor/react-native-vector-icons/glyphmaps/SimpleLineIcons.json';
|
||||
import createIconSet from './createIconSet';
|
||||
|
||||
export default createIconSet(
|
||||
glyphMap,
|
||||
'simple-line-icons',
|
||||
require('./fonts/SimpleLineIcons.ttf')
|
||||
);
|
||||
export default createIconSet(glyphMap, 'simple-line-icons', require('./fonts/SimpleLineIcons.ttf'));
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { Font } from 'expo';
|
||||
import createIconSetFromFontello
|
||||
from './vendor/react-native-vector-icons/lib/create-icon-set-from-fontello';
|
||||
import createIconSetFromFontello from './vendor/react-native-vector-icons/lib/create-icon-set-from-fontello';
|
||||
|
||||
export default function(config, expoFontName, expoAssetId) {
|
||||
return createIconSetFromFontello(
|
||||
config,
|
||||
Font.style(expoFontName).fontFamily,
|
||||
expoAssetId
|
||||
);
|
||||
return createIconSetFromFontello(config, Font.style(expoFontName).fontFamily, expoAssetId);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { Font } from 'expo';
|
||||
import createIconSetFromIcoMoon
|
||||
from './vendor/react-native-vector-icons/lib/create-icon-set-from-icomoon';
|
||||
import createIconSetFromIcoMoon from './vendor/react-native-vector-icons/lib/create-icon-set-from-icomoon';
|
||||
|
||||
export default function(config, expoFontName, expoAssetId) {
|
||||
return createIconSetFromIcoMoon(
|
||||
config,
|
||||
Font.style(expoFontName).fontFamily,
|
||||
expoAssetId
|
||||
);
|
||||
return createIconSetFromIcoMoon(config, Font.style(expoFontName).fontFamily, expoAssetId);
|
||||
}
|
||||
|
||||
+1
-4
@@ -59,10 +59,7 @@ class App extends Component {
|
||||
render() {
|
||||
const { searchText } = this.state;
|
||||
const data = IconsArray.filter(icon => {
|
||||
return (
|
||||
icon.name.includes(searchText) ||
|
||||
icon.family.toLowerCase().includes(searchText)
|
||||
);
|
||||
return icon.name.includes(searchText) || icon.family.toLowerCase().includes(searchText);
|
||||
});
|
||||
|
||||
return (
|
||||
|
||||
+1
-3
@@ -4,9 +4,7 @@ import { IconFamilies } from './IconConstants';
|
||||
export default class Icon extends Component {
|
||||
render() {
|
||||
return (
|
||||
<span
|
||||
style={{ fontFamily: this.props.family }}
|
||||
className={this.props.className}>
|
||||
<span style={{ fontFamily: this.props.family }} className={this.props.className}>
|
||||
{String.fromCharCode(IconFamilies[this.props.family][this.props.name])}
|
||||
</span>
|
||||
);
|
||||
|
||||
@@ -6,14 +6,15 @@ export default class IconList extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<AutoSizer>
|
||||
{({ height, width }) =>
|
||||
{({ height, width }) => (
|
||||
<List
|
||||
height={height}
|
||||
width={width}
|
||||
rowCount={this.props.data.length}
|
||||
rowHeight={60}
|
||||
rowRenderer={this._renderRow}
|
||||
/>}
|
||||
/>
|
||||
)}
|
||||
</AutoSizer>
|
||||
);
|
||||
}
|
||||
@@ -42,15 +43,11 @@ export default class IconList extends React.Component {
|
||||
<Icon family={family} name={name} className="Result-Icon" />
|
||||
</div>
|
||||
<div style={{ flex: 1, maxWidth: 200 }}>
|
||||
<h4 className="Result-Icon-Name">
|
||||
{name}
|
||||
</h4>
|
||||
<h4 className="Result-Icon-Name">{name}</h4>
|
||||
</div>
|
||||
|
||||
<div style={{ flex: 1 }}>
|
||||
<h4 className="Result-Family-Name">
|
||||
{family}
|
||||
</h4>
|
||||
<h4 className="Result-Family-Name">{family}</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user