How to use the @rmwc/card.CardMedia function in @rmwc/card

To help you get started, we’ve selected a few @rmwc/card 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 fluidtrends / chunky / web / lib / components / Team.js View on Github external
var width = this.props.small ? 100 : 220;
      var height = this.props.small ? 100 : 220;

      var style = {
        alignSelf: 'center',
        marginTop: '20px',
        objectFit: 'cover',
        height: height,
        width: width,
        borderRadius: '50%',
        objectPosition: 'center center'
      };
      var props = Object.assign({}, this.props);
      delete props.video;
      return _react2.default.createElement(
        _card.CardMedia,
        {
          style: {
            backgroundColor: item.backgroundColor,
            cursor: this.props.imageClickable && !this.state.detailDialogOpen ? 'pointer' : 'initial'
          },
          onClick: function onClick() {
            _this3.props.imageClickable ? _this3.setState({ detailDialogOpen: true, item: item }) : false;
          }
        },
        _react2.default.createElement(_Media2.default, { cache: this.props.cache, roundImg: true, image: image, style: style })
      );
    }
  }, {
github fluidtrends / chunky / web / lib / components / Collection.js View on Github external
return _react2.default.createElement('div', null);
      }

      var style = {
        alignSelf: 'center',
        width: '320px',
        height: '170px',
        objectFit: 'cover',
        objectPosition: 'center center'
      };
      var innerWidth = '320px';
      var props = Object.assign({}, this.props);
      delete props.video;

      return _react2.default.createElement(
        _card.CardMedia,
        { style: {
            backgroundColor: item.backgroundColor
          } },
        _react2.default.createElement(_Media2.default, {
          cache: this.props.cache,
          image: image,
          desktop: this.props.desktop,
          innerWidth: innerWidth,
          style: style })
      );
    }
  }, {

@rmwc/card

RMWC Card component

MIT
Latest version published 12 days ago

Package Health Score

84 / 100
Full package analysis