gisikw/storybook-addon-superficial

View on GitHub
src/colors.js

Summary

Maintainability
A
0 mins
Test Coverage
const colors = {};
export default (prop) => {
  if (!colors[prop]) {
    colors[prop] = `hsl(${(70 * Object.keys(colors).length) % 360}, 100%, 35%)`;
  }
  return colors[prop];
};