Sha256: abbdb11779fe68b38828db9ae85415fe6629ce844549935b5870d4fd3e9f2153

Contents?: true

Size: 424 Bytes

Versions: 162

Compression:

Stored size: 424 Bytes

Contents

import colors from "../tokens/exports/_colors.scss";


// Map Data Color String Props to our SCSS Variables
const mapColors = (array: string[]): string[] => {
    const regex = /(data)\-[1-8]/; //eslint-disable-line
  
    const newArray = array.map((item) => {
      return regex.test(item)
        ? `${colors[`data_${item[item.length - 1]}`]}`
        : item;
    });
    return newArray;
  };

  export default mapColors

Version data entries

162 entries across 162 versions & 1 rubygems

Version Path
playbook_ui-13.31.0.pre.alpha.PBNTR342navtabbing3231 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.31.0.pre.alpha.PBNTR342navtabbing3230 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.32.0 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.31.0.pre.alpha.powercentrainplaybookpt23212 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.31.0.pre.alpha.PLAY10863204 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.31.0.pre.alpha.PLAY10863202 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.31.0.pre.alpha.PLAY882formpillprimaryandneutral3201 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.31.0.pre.alpha.play1262iconstyles3172 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.31.0.pre.alpha.play1262iconstyles3171 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.31.0 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.30.0.pre.alpha.play1367contenttagnoninputkits3159 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.30.0.pre.alpha.20240515remotebuildkitconversion3150 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.30.0.pre.alpha.PBNTR353draggablev53136 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.30.0.pre.alpha.PLAY1328fixtimelinekitglobalpropsreact3096 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.30.0 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.29.0.pre.alpha.removeduplicatekitexampleclass3063 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.29.0.pre.alpha.PBNTR329draggablev33060 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.29.0.pre.alpha.PBNTR329draggablev33059 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.29.0.pre.alpha.testingcollapsibleissue3052 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts
playbook_ui-13.29.0 app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts