1 | import { getPath } from '@mui/system/style';
|
2 | import { alpha } from '@mui/system/colorManipulator';
|
3 | const getTextDecoration = ({
|
4 | theme,
|
5 | ownerState
|
6 | }) => {
|
7 | const transformedColor = ownerState.color;
|
8 | const color = getPath(theme, `palette.${transformedColor}`, false) || ownerState.color;
|
9 | const channelColor = getPath(theme, `palette.${transformedColor}Channel`);
|
10 | if ('vars' in theme && channelColor) {
|
11 | return `rgba(${channelColor} / 0.4)`;
|
12 | }
|
13 | return alpha(color, 0.4);
|
14 | };
|
15 | export default getTextDecoration; |
\ | No newline at end of file |