UNPKG

@mui/styles

Version:

MUI Styles - The legacy JSS-based styling solution of Material UI.

16 lines (14 loc) 716 B
import { StyleRules } from '@mui/styles/withStyles'; /** * This function doesn't really "do anything" at runtime, it's just the identity * function. Its only purpose is to defeat TypeScript's type widening when providing * style rules to `withStyles` which are a function of the `Theme`. * @param styles a set of style mappings * @returns the same styles that were passed in */ // For TypeScript v3.5 Props has to extend {} instead of object // See https://github.com/mui/material-ui/issues/15942 // and https://github.com/microsoft/TypeScript/issues/31735 export default function createStyles<ClassKey extends string, Props extends {}>( styles: StyleRules<Props, ClassKey>, ): StyleRules<Props, ClassKey>;