New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

responsive-css-material-ui

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

responsive-css-material-ui

A material-ui component which applies different CSS to a child component based on the page's current width (based on material-ui defined breakpoints).

latest
Source
npmnpm
Version
3.1.1
Version published
Maintainers
1
Created
Source

responsive-css-material-ui Weekly downloads

A material-ui component which applies different CSS to a child component based on the page's current width (based on material-ui defined breakpoints).

The order of breakpoints: xs, sm, md, lg, xl. You can find here the values defined currently by material-ui for these breakpoints.

Demo

You can access the storybook for this component here.

Props

The component accepts the props defined bellow in the table.

Props accepted by ResponsiveCssMaterialUi

NameTypeRequiredDefaultDescription
lgCSSPropertiesnoundefinedCSS used for the lg breakpoint and wider screens (if not overridden)
mdCSSPropertiesnoundefinedCSS used for the md breakpoint and wider screens (if not overridden)
smCSSPropertiesnoundefinedCSS used for the sm breakpoint and wider screens (if not overridden)
xlCSSPropertiesnoundefinedCSS used for the xl breakpoint and wider screens (if not overridden)
xsCSSPropertiesnoundefinedCSS used for the xs breakpoint and bellow, and wider screens (if not overridden)

There must be only one child otherwise an exception is triggered.

Versions

ResponsiveCssMaterialUi usesMaterial-uiReact
1.0.x3.9.316.8.6
2.0.x4.0.216.8.6
2.1.x4.2.016.8.6
2.2.x4.2.116.8.6
2.3.x4.3.316.9.0
2.4.x4.9.016.9.0
2.5.x4.9.716.9.0
2.6.x4.10.216.9.0
2.7.x4.11.016.9.0
2.8.x4.11.316.9.0 or 17.0.0
2.9.x4.12.316.9.0 or 17.0.0
3.0.x5.10.1718.0.0
3.1.x5.14.2018.0.0

About versioning schema used for ResponsiveCssMaterialUi

  • Major - it will be increased if the major version of the dependat package changes or there are breaking changes in the code of ResponsiveCssMaterialUi
  • Minor - it will be increased if no major version of the dependat package changes, but there are changes of the minor or patch versions of it
  • Patch - it will be increased if there are no changes of the dependat packages, but there are non breaking changes in the code of ResponsiveCssMaterialUi

Example

Displaying a div aligned differently based on the current window size:

import * as React from 'react';
import ResponsiveCssMaterialUi from 'responsive-css-material-ui';

class App extends React.Component {
  render() {
    var xs = { textAlign: 'center' };
    var md = { textAlign: 'left' };
    var lg = { textAlign: 'right' };
    var style = { color: 'gray' };

    return (
      <div className="App">
        <ResponsiveCssMaterialUi xs={xs} md={md} lg={lg}>
          <div style={style}>Text</div>
        </ResponsiveCssMaterialUi>
      </div>
    );
  }
}

export default App;

Changelog

1.0.0

  • responsive-css-material-ui is made publicly available

1.0.1

  • Corrected the way we decide which provided style is applied

1.0.2

  • Removed the requirement to provide at least one prop

2.0.0

  • Updated packages

2.1.0

  • Updated packages

2.2.0

  • Added a storybook
  • Updated packages

2.2.1

  • Added a prop debug for an easier development

2.3.0

  • Updated packages

2.4.0

  • Updated packages

2.5.0

  • Updated packages
  • Moved from npm to yarn

2.6.0

  • Updated packages

2.7.0

  • Updated packages

2.7.1

  • Fixed crash produced by "export * from"

2.8.0

  • Accepting React 17 as peerDependencies
  • Fixed security warnings

2.9.0

  • Updated the packages

3.0.0

  • Migrated to material-ui 5
  • Supports minimum React 18

3.1.0

  • Updated the packages

3.1.1

  • Fixed bundled lib

Keywords

img

FAQs

Package last updated on 10 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts