diff --git a/packages/page-accounts/src/Accounts/Account.tsx b/packages/page-accounts/src/Accounts/Account.tsx
index 1f87301f0c..89267e832d 100644
--- a/packages/page-accounts/src/Accounts/Account.tsx
+++ b/packages/page-accounts/src/Accounts/Account.tsx
@@ -16,7 +16,7 @@ import React, { useCallback, useContext, useEffect, useMemo, useState } from 're
import styled, { ThemeContext } from 'styled-components';
import { ApiPromise } from '@polkadot/api';
-import { AddressInfo, AddressSmall, Badge, Button, ChainLock, CryptoType, Forget, Icon, IdentityIcon, LinkExternal, Menu, Popup, StatusContext, Tags } from '@polkadot/react-components';
+import { AddressInfo, AddressSmall, Badge, Button, ChainLock, CryptoType, ExpandButton, Forget, Icon, IdentityIcon, LinkExternal, Menu, Popup, StatusContext, Tags } from '@polkadot/react-components';
import { useAccountInfo, useApi, useBalancesAll, useBestNumber, useCall, useLedger, useStakingInfo, useToggle } from '@polkadot/react-hooks';
import { keyring } from '@polkadot/ui-keyring';
import { BN_ZERO, formatBalance, formatNumber, isFunction } from '@polkadot/util';
@@ -659,18 +659,10 @@ function Account ({ account: { address, meta }, className = '', delegation, filt
}
/>
-
-
-
+ />
@@ -730,17 +722,6 @@ export default React.memo(styled(Account)`
opacity: 0.65;
}
- .table-column-icon {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 1.7rem;
- height: 1.7rem;
- border: 1px solid var(--border-table);
- border-radius: 4px;
- cursor: pointer;
- }
-
&& td.button {
padding-bottom: 0.5rem;
}
diff --git a/packages/page-bounties/src/Bounty.tsx b/packages/page-bounties/src/Bounty.tsx
index 357c1248ed..5856e6ac0d 100644
--- a/packages/page-bounties/src/Bounty.tsx
+++ b/packages/page-bounties/src/Bounty.tsx
@@ -7,7 +7,7 @@ import type { BlockNumber, Bounty as BountyType, BountyIndex } from '@polkadot/t
import React, { useCallback, useMemo, useState } from 'react';
import styled from 'styled-components';
-import { AddressSmall, Icon, LinkExternal } from '@polkadot/react-components';
+import { AddressSmall, ExpandButton, LinkExternal } from '@polkadot/react-components';
import { FormatBalance } from '@polkadot/react-query';
import { formatNumber } from '@polkadot/util';
@@ -141,17 +141,10 @@ function Bounty ({ bestNumber, bounty, className = '', description, index, isEve
proposals={proposals}
status={status}
/>
-
-
-
+ />
@@ -236,17 +229,6 @@ export default React.memo(styled(Bounty)`
margin-left: 0.285rem;
}
}
-
- .table-column-icon {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 1.7rem;
- height: 1.7rem;
- border: 1px solid var(--border-table);
- border-radius: 4px;
- cursor: pointer;
- }
}
& .inline-balance {
diff --git a/packages/react-components/src/ExpandButton.tsx b/packages/react-components/src/ExpandButton.tsx
new file mode 100644
index 0000000000..6e9f2ddfd6
--- /dev/null
+++ b/packages/react-components/src/ExpandButton.tsx
@@ -0,0 +1,36 @@
+// Copyright 2017-2021 @polkadot/react-components authors & contributors
+// SPDX-License-Identifier: Apache-2.0
+
+import React from 'react';
+import styled from 'styled-components';
+
+import { Icon } from '@polkadot/react-components';
+
+interface Props {
+ onClick: () => void;
+ expanded: boolean;
+ className?: string;
+}
+
+function ExpandButton ({ className = '', expanded, onClick }: Props): React.ReactElement {
+ return (
+
+
+
+ );
+}
+
+export default React.memo(styled(ExpandButton)`
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 1.7rem;
+ height: 1.7rem;
+ border: 1px solid var(--border-table);
+ border-radius: 4px;
+ cursor: pointer;
+`);
diff --git a/packages/react-components/src/index.tsx b/packages/react-components/src/index.tsx
index a3cb1f5696..8a7216dfe8 100644
--- a/packages/react-components/src/index.tsx
+++ b/packages/react-components/src/index.tsx
@@ -97,5 +97,6 @@ export { default as TxButton } from './TxButton';
export { default as VoteAccount } from './VoteAccount';
export { default as VoteValue } from './VoteValue';
export { default as TextArea } from './TextArea';
+export { default as ExpandButton } from './ExpandButton';
export { default as media } from './media';
diff --git a/packages/react-components/src/styles/index.ts b/packages/react-components/src/styles/index.ts
index 769a7d37bf..9e13405b9e 100644
--- a/packages/react-components/src/styles/index.ts
+++ b/packages/react-components/src/styles/index.ts
@@ -311,6 +311,14 @@ export default createGlobalStyle(({ theme, uiHighlight }: Pr
}
}
+ .ui--ExpandButton:hover {
+ border-color: ${getHighlight(uiHighlight)} !important;
+
+ .ui--Icon {
+ color: ${getHighlight(uiHighlight)} !important;
+ }
+ }
+
.ui--Tag.themeColor.lightTheme,
.ui--InputTags.lightTheme .ui.label {
background: ${hexToRGB(getHighlight(uiHighlight), '0.08')};