Use react-icons
This commit is contained in:
parent
bb66740fd1
commit
c704ebb042
13 changed files with 269 additions and 309 deletions
|
@ -1,12 +1,19 @@
|
|||
import React from 'react';
|
||||
import cn from 'classnames';
|
||||
|
||||
const Button = ({ children, category, className, ...props }) => (
|
||||
const Button = ({ children, category, className, icon: Icon, ...props }) => (
|
||||
<button
|
||||
className={cn(`button-${category}`, className)}
|
||||
className={cn(
|
||||
{
|
||||
[`button-${category}`]: category,
|
||||
'icon-button': Icon && !children
|
||||
},
|
||||
className
|
||||
)}
|
||||
type="button"
|
||||
{...props}
|
||||
>
|
||||
{Icon && <Icon />}
|
||||
{children}
|
||||
</button>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue