Socket
Socket
Sign inDemoInstall

react-base16-styling

Package Overview
Dependencies
8
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.0 to 0.5.1

34

__tests__/index.js

@@ -81,3 +81,9 @@ // @flow

}
})
}),
baseStyle: {
color: 'red'
},
additionalStyle: {
border: 0
}
});

@@ -150,1 +156,27 @@

});
test('createStyling (multiple)', t => {
const styling = createStyling(getStylingFromBase16, { defaultBase16: apathy });
let customStyling = styling({
baseStyle: ({ style }) => ({ style: { ...style, color: 'blue' } })
});
t.deepEqual(customStyling(['baseStyle', 'additionalStyle']), {
style: {
color: 'blue',
border: 0
}
});
customStyling = styling({
additionalStyle: ({ style }) => ({ style: { ...style, border: 1 } })
});
t.deepEqual(customStyling(['baseStyle', 'additionalStyle']), {
style: {
color: 'red',
border: 1
}
});
});

16

lib/index.js

@@ -80,3 +80,3 @@ 'use strict';

className: [prevStyling.className, styling.className].filter(Boolean).join(' '),
style: (0, _extends3.default)({}, prevStyling || {}, styling || {})
style: (0, _extends3.default)({}, prevStyling.style || {}, styling.style || {})
};

@@ -101,3 +101,3 @@ };

case 'string':
return defaultStyling + ' ' + customStyling;
return [defaultStyling, customStyling].filter(Boolean).join(' ');
case 'object':

@@ -111,5 +111,5 @@ return merger({ className: customStyling, style: defaultStyling });

return (0, _extends3.default)({}, defaultStyling.apply(undefined, [styling].concat(args)), {
return merger({
className: customStyling
});
})(defaultStyling.apply(undefined, [styling].concat(args)));
};

@@ -129,5 +129,5 @@ }

return (0, _extends3.default)({}, defaultStyling.apply(undefined, [styling].concat(args)), {
return merger({
style: customStyling
});
})(defaultStyling.apply(undefined, [styling].concat(args)));
};

@@ -143,3 +143,3 @@ }

return customStyling.apply(undefined, [(0, _extends3.default)({}, styling, {
return customStyling.apply(undefined, [merger(styling)({
className: defaultStyling

@@ -154,3 +154,3 @@ })].concat(args));

return customStyling.apply(undefined, [(0, _extends3.default)({}, styling, {
return customStyling.apply(undefined, [merger(styling)({
style: defaultStyling

@@ -157,0 +157,0 @@ })].concat(args));

{
"name": "react-base16-styling",
"version": "0.5.0",
"version": "0.5.1",
"description": "React styling with base16 color scheme support",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc