- {hasContent && (
-
- )}{summary}
+ {hasContent
+ ?
+ : withDot
+ ?
+ : undefined
+ }{summary}
{hasContent && (isExpanded || withHidden) && (
{children}
@@ -46,9 +50,15 @@ export default React.memo(styled(Expander)`
display: none;
}
- .ui--Expander-summary {
+ &.hasContent .ui--Expander-summary {
cursor: pointer;
+ }
+
+ .ui--Expander-summary {
display: block;
+ margin: 0 0 0.5rem 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
white-space: nowrap;
i.icon {
diff --git a/packages/react-components/src/ProposedAction.tsx b/packages/react-components/src/ProposedAction.tsx
index 531c20906e..d9b1b42b2d 100644
--- a/packages/react-components/src/ProposedAction.tsx
+++ b/packages/react-components/src/ProposedAction.tsx
@@ -11,6 +11,7 @@ import { registry } from '@polkadot/react-api';
import { formatNumber, isString } from '@polkadot/util';
import Call from './Call';
+import Expander from './Expander';
import Inset, { InsetProps } from './Inset';
import TreasuryProposal from './TreasuryProposal';
import { isTreasuryProposalVote } from './util';
@@ -93,16 +94,16 @@ function ProposedAction ({ className, asInset, idNumber, insetProps, isCollapsib
{header}
{isCollapsible
? (
-
+
{documentation}
{params}
-
+
)
: (
<>
-
+
{documentation}
-
+
{params}
>
)}
diff --git a/packages/react-signer/src/Checks/index.tsx b/packages/react-signer/src/Checks/index.tsx
index fa484bc9f0..ad472bd867 100644
--- a/packages/react-signer/src/Checks/index.tsx
+++ b/packages/react-signer/src/Checks/index.tsx
@@ -9,6 +9,7 @@ import { RuntimeDispatchInfo } from '@polkadot/types/interfaces';
import BN from 'bn.js';
import React, { useState, useEffect } from 'react';
import { Trans } from 'react-i18next';
+import { Expander } from '@polkadot/react-components';
import { useApi } from '@polkadot/react-hooks';
import { formatBalance } from '@polkadot/util';
@@ -37,12 +38,14 @@ export default function Checks ({ accountId, className, extrinsic }: Props): Rea
}
return (
-
-
+
Fees of {formatBalance(dispatchInfo.partialFee, { withSiFull: true })} will be applied to the submission
-
-
+ }
+ withDot
+ />
);
}
diff --git a/packages/react-signer/src/Transaction.tsx b/packages/react-signer/src/Transaction.tsx
index 99bd5852aa..f53bc1e8a3 100644
--- a/packages/react-signer/src/Transaction.tsx
+++ b/packages/react-signer/src/Transaction.tsx
@@ -9,7 +9,7 @@ import BN from 'bn.js';
import React from 'react';
import styled from 'styled-components';
import { registry } from '@polkadot/react-api';
-import { Call, InputAddress, Modal } from '@polkadot/react-components';
+import { Call, InputAddress, Expander, Modal } from '@polkadot/react-components';
import Checks from './Checks';
import { useTranslation } from './translate';
@@ -66,19 +66,23 @@ function Transaction ({ children, className, hideDetails, isSendable, onError, v
withLabel
/>
)}
-
-
- {t('Sending transaction')} {section}.{method}({
- meta?.args.map(({ name }) => name).join(', ') || ''
- })
-
+
+ {t('Sending transaction')} {section}.{method}({
+ meta?.args.map(({ name }) => name).join(', ') || ''
+ })
+ >
+ }
+ >
{formatMeta(meta)}
-
+
>
)}
{!hideDetails && !isUnsigned && (
@@ -99,7 +103,7 @@ export default React.memo(styled(Transaction)`
.tx-details {
margin-left: 2rem;
- summary {
+ .ui--Expander-summary {
font-size: 1.1rem;
margin: 0.5rem 0;
}