JSFiddle - React, Tailwind, and code Playground

by Amens

JavaScript

const testArray = [
  ['cartToggle', 'svg', {
    width: '80px',
    height: '80px',
    padding: '25px',
    background: '#FFF',
    zIndex: '5',
  }],
  ['cartToggle', ':before', {
    content: '""',
    background: 'red',
    borderRadius: '100%',
    position: 'absolute',
    width: '20px',
    height: '20px',
    lineHeight: '18px',
    color: '#FFF',
    fontWeight: 'bold',
    fontSize: '12px',
    left: '50px',
    zIndex: '10',
    top: '20px',
  }],

]

console.log()


const initStyles = [{
    className: 'cartToggle',
    styleInput: {
      left: '0px',
      position: 'fixed',
      fontSize: '16px',
      display: 'flex',
      alignItems: 'center',
      justifyContent: 'center',
      bottom: '0',
      zIndex: '450',
      background: '#FFF',
      boxShadow: 'rgba(0, 0, 0, 0.3) 0px 0px 4px 0px',
    },
  },
  {
    className: 'cartToggle svg',
    styleInput: {
      width: '80px',
      height: '80px',
      padding: '25px',
      background: '#FFF',
      zIndex: '5',
    },
  }
];

'cartToggle svg'