Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { id, disabled } = props;
const icon = useIcon("download", propIcon);
const { ripples, className, handlers } = useInteractionStates({
handlers: {
onKeyDown,
onKeyUp,
onMouseDown,
onMouseUp,
onMouseLeave,
onClick,
onTouchStart,
onTouchMove,
onTouchEnd,
},
className: buttonThemeClassNames({
theme,
themeType,
buttonType,
disabled,
className: propClassName,
}),
// pressent enter or space would trigger two click events otherwise.
disableEnterClick: true,
});
let content: ReactNode = icon;
if (disableIconSpacing || (children && !icon)) {
content = (
{!iconAfter && icon}
{children}
> = allProps => {
const { theme: t, themeType, buttonType, className, ...props } = allProps;
return (
);
};
const LinkButton: FC = providedProps => {
const {
className: propClassName,
theme,
buttonType,
themeType,
portal,
portalInto,
portalIntoId,
children,
...props
} = providedProps;
const { ripples, className, handlers } = useInteractionStates({
handlers: props,
className: buttonThemeClassNames(providedProps),
});
return (
{ripples}
{children}
const LinkButton: FC = providedProps => {
const {
className: _className,
theme,
buttonType,
themeType,
children,
...props
} = providedProps;
const { ripples, className, handlers } = useInteractionStates({
handlers: props,
className: buttonThemeClassNames(providedProps),
});
return (
{ripples}
{children}