Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
<path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z" fill="replace" stroke="replace"/>
<path d="M0-.5h24v24H0z" fill="none"/>
</svg>
import React from 'react';
import Svg, {
Circle,
Ellipse,
G,
LinearGradient,
RadialGradient,
Line,
Path,
Polygon,
Polyline,
Rect,
Text,
TSpan,
Defs,
Stop
} from 'react-native-svg';
module.exports = ({ width, height, fill, stroke }) => (
<Svg fill={"#000000"} width={width} height={height} viewBox={"0 0 24 24"}>
<Path d={"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"} fill={fill} stroke={stroke} />
<Path d={"M0-.5h24v24H0z"} fill={"none"} />
</Svg>
);
npm install --save-dev ttf-loader
# or yarn
yarn add -D ttf-loader
webpack-config
...
module: {
rules: [
{
test: /\.svg$/,
use: [
{
loader: 'ttf-loader',
},
]
}
]
}
import React, { Component } from 'react';
import { View, Text } from 'react-native';
import MyLogo from './my-logo.svg';
export default class App extends Component {
render() {
return (
<View>
<Text>
Welcome to my React Native app!
</Text>
<MyLogo width={40} height={40} />
</View>
);
}
}
width
- Width in number
of the svg.height
- Height in number
of the svgfill
- Fill color of the shapes you want (need to give attribute fill="replace"
in original svg).stroke
- Stroke color of the shapes you want (need to give attribute stroke="replace"
in original svg).FAQs
The simplest font loading using webpack available
We found that ttf-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.