How to use the @mui-treasury/utils/src/getThemeColor function in @mui-treasury/utils

To help you get started, we’ve selected a few @mui-treasury/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github siriwatknp / mui-treasury / packages / mui-styles / src / grid / multiRowBorderedGrid / multiRowBorderedGrid.styles.js View on Github external
item: ({ colWidth = { xs: 12, sm: 6, md: 4 }, borderColor }) => {
      const color = getThemeColor(palette, borderColor, defaultColor);
      const screens = Object.keys(colWidth);
      return {
        boxShadow: `0 1px 0 0 ${color}`,
        borderLeft: `1px solid ${color}`,
        '&:last-of-type': {
          boxShadow: `1px 1px 0 0 ${color}`,
        },
        ...screens.reduce((result, key, index) => {
          const media = {};
          const width = colWidth[key];
          const { up, only } = breakpoints;
          const creator = index !== screens.length - 1 ? only : up;
          media[creator(key)] = {
            [`&:nth-of-type(${12 / width}n+1)`]: {
              borderLeft: 'none',
            },
github siriwatknp / mui-treasury / packages / mui-styles / src / grid / singleRowBorderedGrid / singleRowBorderedGrid.styles.js View on Github external
container: ({ borderColor }) => {
      const color = getThemeColor(palette, borderColor, defaultColor);
      return {
        border: `1px solid ${color}`,
      };
    },
    item: ({ borderColor }) => {