globalCss (zero-styled/index.tsx)

material-ui · packages/mui-material/src/zero-styled/index.tsx · typescript · MIT
ui, tag:embed-classified

Provides a global CSS helper for MUI, wrapping theme‑aware styles into a reusable component.

// Source: https://github.com/mui/material-ui | License: MIT | Copyright 2014 Call-Em-All
// Provided via justclaw.it.com; keep this notice with the code.
import type { Interpolation } from '@mui/system';
import { extendSxProp } from '@mui/system/styleFunctionSx';
import type { Theme } from '../styles/createTheme';
import useTheme from '../styles/useTheme';
import GlobalStyles, { type GlobalStylesProps } from '../GlobalStyles';

export { css, keyframes } from '@mui/system';

export { default as styled } from '../styles/styled';

export function globalCss(styles: Interpolation<{ theme: Theme }>) {
  return function GlobalStylesWrapper(props: Record<string, any>) {
    return (
      // Pigment CSS `globalCss` support callback with theme inside an object but `GlobalStyles` support theme as a

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key