IconButton
Basic Usage with Paragon Icon
With tooltips
Active State
isActive=true with inverted colors
Inverted Colors
Sizes
- className
stringRequiredA custom class name.
 - iconAs
elementTypeRequiredComponent that renders the icon, currently defaults to
FontAwesomeIcon, but is going to be deprecated soon, please use Paragon's icons instead. - src
elementRequired |funcRequired RequiredDefaultnullAn icon component to render. Example import of a Paragon icon component:
import { Check } from '@edx/paragon/dist/icon'; - alt
stringRequired RequiredAlt text for your icon. For best practice, avoid using alt text to describe the image in the
IconButton. Instead, we recommend describing the function of the button. - invertColors
boolRequiredDefaultfalseChanges icon styles for dark background
 - icon
shapeRequired {prefix:string,iconName:string,icon:}array,Accepts a React fontawesome icon. https://fontawesome.com/how-to-use/on-the-web/using-with/react
 - iconClassNames
stringRequiredExtra class names that will be added to the icon
 - onClick
funcRequiredDefault() => {}Click handler for the button
 - variant
enumRequired'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'light' | 'dark' | 'black' | 'brand'Default'primary'Type of button (uses Bootstrap options)
 - size
enumRequired'sm' | 'md' | 'inline'Default'md'size of button to render
 - isActive
boolRequiredDefaultfalsewhether to show the
IconButtonin an active state, whose styling is distinct from default state 
- tooltipPlacement
stringRequiredDefault'top'tooltip placement can be top, left, right etc, per https://popper.js.org/docs/v2/constructors/#options
 - tooltipContent
nodeRequired Requiredany valid JSX or text to be rendered as tooltip contents
 - variant
enumRequired'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'light' | 'dark' | 'black' | 'brand'Default'primary'Type of button (uses Bootstrap options)
 - invertColors
boolRequiredDefaultfalseChanges icon styles for dark background