diff --git a/packages/react-components/src/Button/Button.tsx b/packages/react-components/src/Button/Button.tsx
index 8e2a0689cb..80a3f02b38 100644
--- a/packages/react-components/src/Button/Button.tsx
+++ b/packages/react-components/src/Button/Button.tsx
@@ -4,25 +4,19 @@
import { ButtonProps } from './types';
-import React, { useState } from 'react';
+import React from 'react';
import SUIButton from 'semantic-ui-react/dist/commonjs/elements/Button/Button';
import styled from 'styled-components';
import Icon from '../Icon';
-import Tooltip from '../Tooltip';
-let idCounter = 0;
-
-function Button ({ children, className = '', floated, icon, isAnimated, isBasic = false, isCircular = false, isDisabled = false, isFluid = false, isIcon, isLoading = false, isNegative = false, isPositive = false, isPrimary = false, label, labelPosition, onClick, onMouseEnter, onMouseLeave, size, tabIndex, tooltip }: ButtonProps): React.ReactElement
{
- const [triggerId] = useState(`button-${++idCounter}`);
+function Button ({ children, className = '', floated, icon, isAnimated, isBasic = false, isCircular = false, isDisabled = false, isFluid = false, isIcon, isLoading = false, isNegative = false, isPositive = false, isPrimary = false, label, labelPosition, onClick, onMouseEnter, onMouseLeave, size, tabIndex }: ButtonProps): React.ReactElement {
const props = {
animate: 'fade',
animated: isAnimated,
basic: isBasic,
- circular: isCircular,
+ circular: true,
className: `${className} ${isCircular ? 'isCircular' : ''} ${isIcon ? 'isIcon' : ''} ${(isCircular || isIcon || !(children || label)) ? 'icon' : ''}`,
- 'data-for': triggerId,
- 'data-tip': !!tooltip,
disabled: isDisabled,
floated,
fluid: isFluid,
@@ -48,18 +42,13 @@ function Button ({ children, className = '', floated, icon, isAnimated, isBasic
{label}
{children}
- {tooltip && (
-
- )}
>
);
}
export default React.memo(styled(Button)`
+ border-radius: 10rem !important;
+
&:not(.icon) {
> .ui--Icon {
margin-right: 0.25rem;
diff --git a/packages/react-components/src/DemocracyLocks.tsx b/packages/react-components/src/DemocracyLocks.tsx
index 011a73cdbd..3d9fb69905 100644
--- a/packages/react-components/src/DemocracyLocks.tsx
+++ b/packages/react-components/src/DemocracyLocks.tsx
@@ -40,9 +40,8 @@ function DemocracyLocks ({ className = '', value }: Props): React.ReactElement
void;
onMouseOver?: () => void;
size?: '1x' | '2x';
+ tooltip?: string;
}
// one-time init of FA libraries
library.add(fas);
-function Icon ({ className = '', color = 'normal', icon, isSpinning, onClick, onMouseOut, onMouseOver, size = '1x' }: Props): React.ReactElement {
+function Icon ({ className = '', color = 'normal', icon, isSpinning, onClick, onMouseOut, onMouseOver, size = '1x', tooltip }: Props): React.ReactElement {
return (
return (
{isTooltipOpen && (