This commit is contained in:
mgabdev
2020-04-23 02:13:29 -04:00
parent fed036be08
commit e2e7e8c0af
177 changed files with 1231 additions and 1326 deletions

View File

@@ -53,6 +53,7 @@ import RepostIcon from '../assets/repost_icon'
import RichTextIcon from '../assets/rich_text_icon'
import SearchIcon from '../assets/search_icon'
import SearchAltIcon from '../assets/search_alt_icon'
import SelectIcon from '../assets/select_icon'
import ShareIcon from '../assets/share_icon'
import ShopIcon from '../assets/shop_icon'
import StrikethroughIcon from '../assets/strikethrough_icon'
@@ -121,6 +122,7 @@ const ICONS = {
'rich-text': RichTextIcon,
'search': SearchIcon,
'search-alt': SearchAltIcon,
'select': SelectIcon,
'share': ShareIcon,
'shop': ShopIcon,
'strikethrough': StrikethroughIcon,
@@ -141,17 +143,16 @@ export default class Icon extends PureComponent {
static propTypes = {
id: PropTypes.string.isRequired,
className: PropTypes.string,
width: PropTypes.string,
height: PropTypes.string,
size: PropTypes.string,
}
render() {
const { id, ...options } = this.props
const { id, size, className } = this.props
// : todo : add all required icons
const Asset = ICONS[id] || CircleIcon
return <Asset {...options} />
return <Asset size={size} className={className} />
}