Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Add CardMedia component #114

Merged
merged 1 commit into from
Nov 13, 2015
Merged

Add CardMedia component #114

merged 1 commit into from
Nov 13, 2015

Conversation

durandj
Copy link
Contributor

@durandj durandj commented Nov 13, 2015

This utilizes the MDL mdl-card__media class as specified in the MDL
specification. While not strictly needed it does make for more semantic markup.

import React, { PropTypes } from 'react';
import classNames from 'classnames';

const CardMedia = (props) => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a good candidate for reusing the basicClassCreator helper.
You can see these 2 as an example: https://github.com/tleunen/react-mdl/blob/master/src/Card/index.js#L4-L5

You can keep the tests though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That did simplify things greatly.

@tleunen
Copy link
Owner

tleunen commented Nov 13, 2015

Thanks @durandj!

This utilizes the MDL mdl-card__media class as specified in the MDL
specification.

Simplify CardMedia component

CardMedia doesn't seem to have any special functionality so the
basicClassCreator could be used to implement all the functionality with
less code.
tleunen added a commit that referenced this pull request Nov 13, 2015
@tleunen tleunen merged commit c0f5fb6 into tleunen:master Nov 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants