Socket
Socket
Sign inDemoInstall

img-material-ui

Package Overview
Dependencies
60
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    img-material-ui

A material-ui component which display an image from different sources based on the page's current width (based on material-ui defined breakpoints).


Version published
Maintainers
1
Created

Readme

Source

img-material-ui

A material-ui component which displays an image from different sources 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.


Props

The component accepts the props defined bellow in the table.

Props accepted by ImgMaterialUi

NameTypeRequiredDefaultDescription
idstringnoundefinedThe id of the field
lgstringno*undefinedSource used for the lg breakpoint and wider screens (if not overridden)
mdstringno*undefinedSource used for the md breakpoint and wider screens (if not overridden)
smstringno*undefinedSource used for the sm breakpoint and wider screens (if not overridden)
xlstringno*undefinedSource used for the xl breakpoint and wider screens (if not overridden)
xsstringno*undefinedSource used for the xs breakpoint and bellow, and wider screens (if not overridden)
styleCSSPropertiesnoundefinedThe style applied to the field

no* means that at least one of them should be defined or an exception is triggered.

Versions

ImgMaterialUi usesMaterial-uiReact
-------------------::---------::----:
1.0.x3.9.216.8.4
1.1.x3.9.316.8.6

About versioning schema used for ImgMaterialUi

  • Major - it will be increased if the major version of the dependat package changes or there are breaking changes in the code of ImgMaterialUi
  • 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 ImgMaterialUi

Example

Displaying an image in three sizes based on the current window size:

import * as React from "react";
import ImgMaterialUi from "img-material-ui";

class App extends React.Component {
  render() {
    return (
      <div className="App">
        <ImgMaterialUi
          xs="/img/logo-small.jpg"
          md="/img/logo-medium.jpg"
          lg="/img/logo-large.jpg"
        />
      </div>
    );
  }
}

export default App;

Changelog

1.0.0

  • img-material-ui is made publicly available

1.1.0

  • Updated packages

Keywords

FAQs

Last updated on 04 Apr 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc