Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
92 changed files
with
1,289 additions
and
572 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,30 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import classnames from 'classnames'; | ||
import modifiers from '../../../modifiers'; | ||
|
||
export default class CardContent extends React.PureComponent { | ||
static displayName = 'Card.Content' | ||
const CardContent = ({ | ||
className, | ||
renderAs, | ||
...allProps | ||
}) => { | ||
const Element = renderAs; | ||
const props = modifiers.clean(allProps); | ||
return ( | ||
<Element {...props} className={classnames('card-content', modifiers.classnames(allProps), className)} /> | ||
); | ||
}; | ||
|
||
static propTypes = { | ||
className: PropTypes.string, | ||
renderAs: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), | ||
} | ||
CardContent.propTypes = { | ||
...modifiers.propTypes, | ||
className: PropTypes.string, | ||
renderAs: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), | ||
}; | ||
|
||
static defaultProps = { | ||
className: '', | ||
renderAs: 'div', | ||
} | ||
CardContent.defaultProps = { | ||
...modifiers.defaultProps, | ||
className: '', | ||
renderAs: 'div', | ||
}; | ||
|
||
render() { | ||
const { | ||
className, | ||
renderAs, | ||
...props | ||
} = this.props; | ||
const Element = renderAs; | ||
return ( | ||
<Element {...props} className={classnames('card-content', className)} /> | ||
); | ||
} | ||
} | ||
export default CardContent; |
45 changes: 23 additions & 22 deletions
45
src/components/card/components/footer/components/footer-item.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,30 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import classnames from 'classnames'; | ||
import modifiers from '../../../../../modifiers'; | ||
|
||
export default class CardFooterItem extends React.PureComponent { | ||
static displayName = 'Card.Footer.Item' | ||
const CardFooterItem = ({ | ||
className, | ||
renderAs, | ||
...allProps | ||
}) => { | ||
const Element = renderAs; | ||
const props = modifiers.clean(allProps); | ||
return ( | ||
<Element {...props} className={classnames('card-footer-item', modifiers.classnames(allProps), className)} /> | ||
); | ||
}; | ||
|
||
static propTypes = { | ||
className: PropTypes.string, | ||
renderAs: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), | ||
} | ||
CardFooterItem.propTypes = { | ||
...modifiers.propTypes, | ||
className: PropTypes.string, | ||
renderAs: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), | ||
}; | ||
|
||
static defaultProps = { | ||
className: '', | ||
renderAs: 'div', | ||
} | ||
CardFooterItem.defaultProps = { | ||
...modifiers.defaultProps, | ||
className: '', | ||
renderAs: 'div', | ||
}; | ||
|
||
render() { | ||
const { | ||
className, | ||
renderAs, | ||
...props | ||
} = this.props; | ||
const Element = renderAs; | ||
return ( | ||
<Element {...props} className={classnames('card-footer-item', className)} /> | ||
); | ||
} | ||
} | ||
export default CardFooterItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.