How to use the @material-ui/system.style function in @material-ui/system

To help you get started, we’ve selected a few @material-ui/system 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 mui-org / material-ui / packages / material-ui-system / src / index.spec.tsx View on Github external
function interopTest() {
  const mixin = style({ prop: 'color' });
  // built-in style function
  const SystemSpacingBox = styled.div`
    ${spacing}
    ${mixin}
  `;
  ;
}
github mui-org / material-ui / docs / src / pages / system / basics / Variant.js View on Github external
import React from 'react';
import styled, { ThemeProvider } from 'styled-components';
import NoSsr from '@material-ui/core/NoSsr';
import { style, typography } from '@material-ui/system';

const variant = style({
  prop: 'variant',
  cssProperty: false,
  themeKey: 'typography',
});

// ⚠ Text is already defined in the global context:
// https://developer.mozilla.org/en-US/docs/Web/API/Text/Text.
const Text = styled.span`
  font-family: Helvetica;
  ${variant}
  ${typography}
`;

const theme = {
  typography: {
    h1: {
github mui-org / material-ui / docs / src / pages / system / basics / Variant.tsx View on Github external
import React from 'react';
import styled, { ThemeProvider } from 'styled-components';
import NoSsr from '@material-ui/core/NoSsr';
import { PropsFor, style, typography, TypographyProps } from '@material-ui/system';

const variant = style({
  prop: 'variant',
  cssProperty: false,
  themeKey: 'typography',
});

// ⚠ Text is already defined in the global context:
// https://developer.mozilla.org/en-US/docs/Web/API/Text/Text.
const Text = styled.span & TypographyProps>`
  font-family: Helvetica;
  ${variant}
  ${typography}
`;

const theme = {
  typography: {
    h1: {
github siriwatknp / mui-treasury / src / helpers / cssSystem.js View on Github external
export const flexGrow = style({
  prop: 'flexGrow',
  cssProperty: 'flexGrow',
});

export const flexShrink = style({
  prop: 'flexShrink',
  cssProperty: 'flexShrink',
});

export const flexBasis = style({
  prop: 'flexBasis',
  cssProperty: 'flexBasis',
});

export const transform = style({
  prop: 'transform',
  cssProperty: 'transform',
});

export const transformOrigin = style({
  prop: 'transformOrigin',
  cssProperty: 'transformOrigin',
});

export const transition = style({
  prop: 'transition',
  cssProperty: 'transition',
});

export const overflow = style({
  prop: 'overflow',
github siriwatknp / mui-treasury / src / helpers / cssSystem.js View on Github external
import display from '@material-ui/system/display';
import flexbox from '@material-ui/system/flexbox';
import palette from '@material-ui/system/palette';
import positions from '@material-ui/system/positions';
import shadows from '@material-ui/system/shadows';
import sizing from '@material-ui/system/sizing';
import spacing from '@material-ui/system/spacing';
import typography from '@material-ui/system/typography';
import css from '@material-ui/system/css';

export const flex = style({
  prop: 'flex',
  cssProperty: 'flex',
});

export const flexGrow = style({
  prop: 'flexGrow',
  cssProperty: 'flexGrow',
});

export const flexShrink = style({
  prop: 'flexShrink',
  cssProperty: 'flexShrink',
});

export const flexBasis = style({
  prop: 'flexBasis',
  cssProperty: 'flexBasis',
});

export const transform = style({
  prop: 'transform',
github siriwatknp / mui-treasury / src / helpers / cssSystem.js View on Github external
export const flexShrink = style({
  prop: 'flexShrink',
  cssProperty: 'flexShrink',
});

export const flexBasis = style({
  prop: 'flexBasis',
  cssProperty: 'flexBasis',
});

export const transform = style({
  prop: 'transform',
  cssProperty: 'transform',
});

export const transformOrigin = style({
  prop: 'transformOrigin',
  cssProperty: 'transformOrigin',
});

export const transition = style({
  prop: 'transition',
  cssProperty: 'transition',
});

export const overflow = style({
  prop: 'overflow',
  cssProperty: 'overflow',
});

export const visibility = style({
  prop: 'visibility',
github siriwatknp / mui-treasury / src / helpers / cssSystem.js View on Github external
import { style, compose } from '@material-ui/system';
import borders from '@material-ui/system/borders';
import display from '@material-ui/system/display';
import flexbox from '@material-ui/system/flexbox';
import palette from '@material-ui/system/palette';
import positions from '@material-ui/system/positions';
import shadows from '@material-ui/system/shadows';
import sizing from '@material-ui/system/sizing';
import spacing from '@material-ui/system/spacing';
import typography from '@material-ui/system/typography';
import css from '@material-ui/system/css';

export const flex = style({
  prop: 'flex',
  cssProperty: 'flex',
});

export const flexGrow = style({
  prop: 'flexGrow',
  cssProperty: 'flexGrow',
});

export const flexShrink = style({
  prop: 'flexShrink',
  cssProperty: 'flexShrink',
});

export const flexBasis = style({
  prop: 'flexBasis',
github siriwatknp / mui-treasury / src / helpers / cssSystem.js View on Github external
export const flexBasis = style({
  prop: 'flexBasis',
  cssProperty: 'flexBasis',
});

export const transform = style({
  prop: 'transform',
  cssProperty: 'transform',
});

export const transformOrigin = style({
  prop: 'transformOrigin',
  cssProperty: 'transformOrigin',
});

export const transition = style({
  prop: 'transition',
  cssProperty: 'transition',
});

export const overflow = style({
  prop: 'overflow',
  cssProperty: 'overflow',
});

export const visibility = style({
  prop: 'visibility',
  cssProperty: 'visibility',
});

export const lineHeight = style({
  prop: 'lineHeight',
github siriwatknp / mui-treasury / src / helpers / cssSystem.js View on Github external
export const overflow = style({
  prop: 'overflow',
  cssProperty: 'overflow',
});

export const visibility = style({
  prop: 'visibility',
  cssProperty: 'visibility',
});

export const lineHeight = style({
  prop: 'lineHeight',
  cssProperty: 'lineHeight',
});

export const letterSpacing = style({
  prop: 'letterSpacing',
  cssProperty: 'letterSpacing',
});

export const allCssSystem = css(
  compose(
    borders,
    display,
    flexbox,
    positions,
    palette,
    shadows,
    sizing,
    spacing,
    typography,
    flex,
github siriwatknp / mui-treasury / src / helpers / cssSystem.js View on Github external
export const transform = style({
  prop: 'transform',
  cssProperty: 'transform',
});

export const transformOrigin = style({
  prop: 'transformOrigin',
  cssProperty: 'transformOrigin',
});

export const transition = style({
  prop: 'transition',
  cssProperty: 'transition',
});

export const overflow = style({
  prop: 'overflow',
  cssProperty: 'overflow',
});

export const visibility = style({
  prop: 'visibility',
  cssProperty: 'visibility',
});

export const lineHeight = style({
  prop: 'lineHeight',
  cssProperty: 'lineHeight',
});

export const letterSpacing = style({
  prop: 'letterSpacing',

@material-ui/system

Material-UI System - Design system for Material-UI.

MIT
Latest version published 3 years ago

Package Health Score

88 / 100
Full package analysis