fix: icon styling with className (#2714)
* fix: icon styling with className * docs: Add resources to docs
This commit is contained in:
1 parent
5c8ee7f906
commit
ea390cc5d8
3 files changed
+10
-29
No files matched your search
@@ -2,15 +2,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import getIcon from './getIcon';
|
||||
|
||||
const Icon = ({ name, className, ...otherProps }) => {
|
||||
if (className) {
|
||||
return (
|
||||
<div className={className}>
|
||||
{getIcon(name, className, { ...otherProps })}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const Icon = ({ name, ...otherProps }) => {
|
||||
return <React.Fragment>{getIcon(name, { ...otherProps })}</React.Fragment>;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user