Accept custom classNames
This commit is contained in:
parent
a0fbf9b767
commit
6806154369
@ -1,7 +1,6 @@
|
||||
import React from 'react';
|
||||
import styles from './Card.css'
|
||||
import styles from './Card.css';
|
||||
|
||||
|
||||
export default function Card({style, children}) {
|
||||
return <div className={styles.card} style={style}>{children}</div>
|
||||
export default function Card({ style, className = '', children }) {
|
||||
return <div className={`${styles.card} ${className}`} style={style}>{children}</div>;
|
||||
}
|
||||
|
@ -191,8 +191,8 @@ const iconPropType = (props, propName) => {
|
||||
}
|
||||
};
|
||||
|
||||
export default function Icon({ style, type }) {
|
||||
return <span className={`${styles.root} ${styles[type]}`} style={style}/>;
|
||||
export default function Icon({ style, className = '', type }) {
|
||||
return <span className={`${styles.root} ${styles[type]} ${className}`} style={style}/>;
|
||||
}
|
||||
|
||||
Icon.propTypes = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user