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