@mui/material
Version:
Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.
15 lines • 521 B
JavaScript
import { getPath } from '@mui/system/style';
import { alpha } from '@mui/system/colorManipulator';
const getTextDecoration = ({
theme,
ownerState
}) => {
const transformedColor = ownerState.color;
const color = getPath(theme, `palette.${transformedColor}`, false) || ownerState.color;
const channelColor = getPath(theme, `palette.${transformedColor}Channel`);
if ('vars' in theme && channelColor) {
return `rgba(${channelColor} / 0.4)`;
}
return alpha(color, 0.4);
};
export default getTextDecoration;