Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-oui-icons

Package Overview
Dependencies
Maintainers
5
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-oui-icons - npm Package Compare versions

Comparing version 2.0.5 to 2.1.0

3

CHANGELOG.md

@@ -9,2 +9,5 @@ # Change Log

## Unreleased
## 2.1.0 - 2018-05-08
- [Fix] Set default fill to currentColor, not black
- [Feature] Allow ellipse shape output in the build script (#31)

@@ -11,0 +14,0 @@ ## 2.0.4 - 2018-03-22

2

package.json
{
"name": "react-oui-icons",
"version": "2.0.5",
"version": "2.1.0",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "module": "src/index.js",

@@ -35,2 +35,5 @@ import PropTypes from 'prop-types';

}
else if(prop.name === 'ellipse') {
return <ellipse {...prop.attrs} key={ `ellipse-${index}` } />
}
else if(prop.name === 'g') {

@@ -49,3 +52,3 @@ return buildSvg(prop.childs)

description = 'icon',
fill = 'black',
fill = 'currentColor',
name,

@@ -55,3 +58,3 @@ role,

stroke = 'none',
style
style = {}
}) => {

@@ -69,6 +72,8 @@ const icon = findIcon(`${name}`);

const iconStyles = style;
iconStyles['fill'] = fill;
const svgClass = `oui-icon display--inline oui-icon--${sizeNumber}`
const props = {
className: svgClass,
fill,
height: sizeNumber,

@@ -78,3 +83,3 @@ name: `${name}`,

stroke,
style,
style: iconStyles,
viewBox: icon.attrs.viewBox,

@@ -81,0 +86,0 @@ width: sizeNumber

@@ -16,4 +16,4 @@ import React from 'react'

it('name prop is equal to ab', () => {
const component = shallow(<Icon
name="ab"
const component = shallow(<Icon
name="ab"
/>);

@@ -33,12 +33,23 @@ expect(component.props().name).toEqual('ab');

it('style is equal to obj with color style', () => {
const component = shallow(
<Icon
name="ab"
size="medium"
style={ {'color': 'tomato'} }
/>);
expect(component.props().style).toEqual({'color': 'tomato'});
});
it('fill is equal tomato', () => {
const component = shallow(
<Icon
name="ab"
size="medium"
fill="tomato"
/>);
expect(component.props().style).toEqual({"fill": "tomato"});
});
it('style is equal to obj with color style and does not affect fill', () => {
const component = shallow(
<Icon
name="ab"
size="medium"
fill="tomato"
style={ { "color": "blue"} }
/>);
expect(component.props().style).toEqual({"color": "blue", "fill": "tomato"});
});
it('role prop is equal to ab icon', () => {

@@ -70,6 +81,6 @@ const component = shallow(

});
//
//
// const component = shallow(<Icon name='bell' />)
// console.log(component);
});
});

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc