Apply consistent ordering to className prop (#8812)
This commit is contained in:
parent
41a737064a
commit
739c5e2aae
@ -33,7 +33,7 @@ function Apps ({ className = '' }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<>
|
||||
<GlobalStyle uiHighlight={uiHighlight} />
|
||||
<StyledDiv className={`apps--Wrapper ${themeClassName} ${className}`}>
|
||||
<StyledDiv className={`${className} apps--Wrapper ${themeClassName}`}>
|
||||
<Menu />
|
||||
<AccountSidebar>
|
||||
<Signer>
|
||||
|
||||
@ -24,7 +24,7 @@ function Item ({ className = '', classNameText, isLink, isToplevel, route: { Mod
|
||||
const count = useCounter();
|
||||
|
||||
return (
|
||||
<StyledLi className={`ui--MenuItem ${className}${count ? ' withCounter' : ''} ${isLink ? 'isLink' : ''} ${isToplevel ? 'topLevel highlight--color-contrast' : ''}`}>
|
||||
<StyledLi className={`${className} ui--MenuItem ${count ? 'withCounter' : ''} ${isLink ? 'isLink' : ''} ${isToplevel ? 'topLevel highlight--color-contrast' : ''}`}>
|
||||
<a
|
||||
href={Modal ? undefined : (href || `#/${name}`)}
|
||||
onClick={Modal ? toggleModal : undefined}
|
||||
|
||||
@ -27,7 +27,7 @@ function Summary ({ className = '', info: { bestNumber, bounties, bountyCount, c
|
||||
);
|
||||
|
||||
return (
|
||||
<SummaryBox className={`ui--BountySummary ${className}`}>
|
||||
<SummaryBox className={`${className} ui--BountySummary`}>
|
||||
<section>
|
||||
{bounties && (
|
||||
<CardSummary label={t<string>('active')}>
|
||||
|
||||
@ -27,7 +27,7 @@ function BountiesApp ({ basePath, className = '' }: Props): React.ReactElement<P
|
||||
]);
|
||||
|
||||
return (
|
||||
<main className={`bounties--App ${className}`}>
|
||||
<main className={`${className} bounties--App`}>
|
||||
<Tabs
|
||||
basePath={basePath}
|
||||
items={itemsRef.current}
|
||||
|
||||
@ -38,7 +38,7 @@ function MonthDay ({ className = '', dateMonth, day, isCurrent, isDisabled, sche
|
||||
|
||||
return (
|
||||
<StyledDiv
|
||||
className={`day${isDisabled ? ' isDisabled' : (isCurrent ? ' highlight--bg-light highlight--color isSelected' : '')} ${className}`}
|
||||
className={`${className} day ${isDisabled ? 'isDisabled' : (isCurrent ? 'highlight--bg-light highlight--color isSelected' : '')}`}
|
||||
onClick={_onClick}
|
||||
>
|
||||
{day}
|
||||
|
||||
@ -22,7 +22,7 @@ function ContractsApp ({ basePath, className = '' }: Props): React.ReactElement<
|
||||
]);
|
||||
|
||||
return (
|
||||
<main className={`contracts--App ${className}`}>
|
||||
<main className={`${className} contracts--App`}>
|
||||
<Tabs
|
||||
basePath={basePath}
|
||||
items={itemsRef.current}
|
||||
|
||||
@ -97,7 +97,7 @@ function Messages ({ className = '', contract, contractAbi: { constructors, info
|
||||
);
|
||||
|
||||
return (
|
||||
<StyledDiv className={`ui--Messages ${className}${isLabelled ? ' isLabelled' : ''}`}>
|
||||
<StyledDiv className={`${className} ui--Messages ${isLabelled ? 'isLabelled' : ''}`}>
|
||||
{withConstructors && (
|
||||
<Expander summary={t<string>('Constructors ({{count}})', { replace: { count: constructors.length } })}>
|
||||
{sortMessages(constructors).map(([message, index]) => (
|
||||
|
||||
@ -45,7 +45,7 @@ function Query ({ className = '', value: propsValue }: Props): React.ReactElemen
|
||||
);
|
||||
|
||||
return (
|
||||
<StyledFilterOverlay className={`ui--FilterOverlay hasOwnMaxWidth ${className}`}>
|
||||
<StyledFilterOverlay className={`${className} ui--FilterOverlay hasOwnMaxWidth`}>
|
||||
<Input
|
||||
className='explorer--query'
|
||||
defaultValue={propsValue}
|
||||
|
||||
@ -13,7 +13,7 @@ export interface Props {
|
||||
function Progress ({ className = '', progress, style }: Props) {
|
||||
return (
|
||||
<StyledDiv
|
||||
className={`highlight--border ${className}`}
|
||||
className={`${className} highlight--border`}
|
||||
style={style}
|
||||
>
|
||||
<div
|
||||
|
||||
@ -61,7 +61,7 @@ const renderEntry = ({ args, type }: Log, index: number): React.ReactNode => {
|
||||
|
||||
function Output ({ children, className = '', logs }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<StyledArticle className={`container ${className}`}>
|
||||
<StyledArticle className={`${className} container`}>
|
||||
<div className='logs-wrapper'>
|
||||
<div className='logs-container'>
|
||||
<pre className='logs-content'>
|
||||
|
||||
@ -237,7 +237,7 @@ function Playground ({ basePath, className = '' }: Props): React.ReactElement<Pr
|
||||
const snippetName = selected.type === 'custom' ? selected.text : undefined;
|
||||
|
||||
return (
|
||||
<StyledMain className={`js--App ${className}`}>
|
||||
<StyledMain className={`${className} js--App`}>
|
||||
<Tabs
|
||||
basePath={basePath}
|
||||
items={tabsRef.current}
|
||||
|
||||
@ -29,7 +29,7 @@ function Account ({ className = '', defaultValue, isError, onChange }: Props): R
|
||||
}, [accountId, accountNonce, onChange]);
|
||||
|
||||
return (
|
||||
<StyledDiv className={`ui--row ${className}`}>
|
||||
<StyledDiv className={`${className} ui--row`}>
|
||||
<div className='large'>
|
||||
<InputAddress
|
||||
defaultValue={defaultValue}
|
||||
|
||||
@ -119,7 +119,7 @@ function Sign ({ className = '' }: Props): React.ReactElement<Props> {
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={`toolbox--Sign ${className}`}>
|
||||
<div className={`${className} toolbox--Sign`}>
|
||||
<div className='ui--row'>
|
||||
<InputAddress
|
||||
className='full'
|
||||
|
||||
@ -75,7 +75,7 @@ function Verify ({ className = '' }: Props): React.ReactElement {
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={`toolbox--Verify ${className}`}>
|
||||
<div className={`${className} toolbox--Verify`}>
|
||||
<div className='ui--row'>
|
||||
<InputAddress
|
||||
className='full'
|
||||
|
||||
@ -24,7 +24,7 @@ function ChartDisplay ({ className = '', colors, header, labels, legends, values
|
||||
);
|
||||
|
||||
return (
|
||||
<StyledDiv className={`staking--Chart ${className}${isLoading ? ' isLoading' : ''}`}>
|
||||
<StyledDiv className={`${className} staking--Chart ${isLoading ? 'isLoading' : ''}`}>
|
||||
<h1>{header}</h1>
|
||||
<Chart.Line
|
||||
colors={colors}
|
||||
|
||||
@ -74,7 +74,7 @@ function Overview ({ className = '', favorites, hasAccounts, hasQueries, minComm
|
||||
const isOwn = typeIndex === 0;
|
||||
|
||||
return (
|
||||
<div className={`staking--Overview ${className}`}>
|
||||
<div className={`${className} staking--Overview`}>
|
||||
<Summary
|
||||
stakingOverview={stakingOverview}
|
||||
targets={targets}
|
||||
|
||||
@ -145,7 +145,7 @@ function StakingApp ({ basePath, className = '' }: Props): React.ReactElement<Pr
|
||||
].filter((q): q is { name: string; text: string } => !!q), [api, hasStashes, slashes, t]);
|
||||
|
||||
return (
|
||||
<StyledMain className={`staking--App ${className}`}>
|
||||
<StyledMain className={`${className} staking--App`}>
|
||||
<Tabs
|
||||
basePath={basePath}
|
||||
hidden={
|
||||
|
||||
@ -171,7 +171,7 @@ function Query ({ className = '', onRemove, value }: Props): React.ReactElement<
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={`storage--Query storage--actionrow ${className}`}>
|
||||
<div className={`${className} storage--Query storage--actionrow`}>
|
||||
<div className='storage--actionrow-value'>
|
||||
<Labelled
|
||||
label={
|
||||
|
||||
@ -24,7 +24,7 @@ function StorageApp ({ basePath, className = '' }: Props): React.ReactElement<Pr
|
||||
);
|
||||
|
||||
return (
|
||||
<main className={`storage--App ${className}`}>
|
||||
<main className={`${className} storage--App`}>
|
||||
<Selection
|
||||
basePath={basePath}
|
||||
onAdd={_onAdd}
|
||||
|
||||
@ -36,7 +36,7 @@ function AccountIndex ({ children, className = '', defaultValue, label, value }:
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={`ui--AccountIndex ${className}`}>
|
||||
<div className={`${className} ui--AccountIndex`}>
|
||||
{label || ''}<div className='account-index'>{accountIndex || defaultValue || '-'}</div>{children}
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -211,7 +211,7 @@ function AccountName ({ children, className = '', defaultName, label, onClick, o
|
||||
|
||||
return (
|
||||
<StyledSpan
|
||||
className={`ui--AccountName${withSidebar ? ' withSidebar' : ''} ${className}`}
|
||||
className={`${className} ui--AccountName ${withSidebar ? 'withSidebar' : ''}`}
|
||||
data-testid='account-name'
|
||||
onClick={
|
||||
withSidebar
|
||||
|
||||
@ -560,7 +560,7 @@ function AddressInfo (props: Props): React.ReactElement<Props> {
|
||||
});
|
||||
|
||||
return (
|
||||
<div className={`ui--AddressInfo ${className}${withBalanceToggle ? ' ui--AddressInfo-expander' : ''}`}>
|
||||
<div className={`${className} ui--AddressInfo ${withBalanceToggle ? 'ui--AddressInfo-expander' : ''}`}>
|
||||
<div className={`column${withBalanceToggle ? ' column--expander' : ''}`}>
|
||||
{renderBalances(props, lookup.current, bestNumber, t)}
|
||||
{withHexSessionId && withHexSessionId[0] && (
|
||||
|
||||
@ -45,7 +45,7 @@ function AddressMini ({ balance, bonded, children, className = '', iconInfo, isH
|
||||
}
|
||||
|
||||
return (
|
||||
<StyledDiv className={`ui--AddressMini${isHighlight ? ' isHighlight' : ''}${isPadded ? ' padded' : ''}${withShrink ? ' withShrink' : ''} ${className}`}>
|
||||
<StyledDiv className={`${className} ui--AddressMini ${isHighlight ? 'isHighlight' : ''} ${isPadded ? 'padded' : ''} ${withShrink ? 'withShrink' : ''}`}>
|
||||
{label && (
|
||||
<label className='ui--AddressMini-label'>{label}</label>
|
||||
)}
|
||||
|
||||
@ -25,7 +25,7 @@ interface Props {
|
||||
|
||||
function AddressSmall ({ children, className = '', defaultName, onClickName, overrideName, parentAddress, toggle, value, withShortAddress = false, withSidebar = true }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<StyledDiv className={`ui--AddressSmall ${className} ${(parentAddress || withShortAddress) ? 'withPadding' : ''}`}>
|
||||
<StyledDiv className={`${className} ui--AddressSmall ${(parentAddress || withShortAddress) ? 'withPadding' : ''}`}>
|
||||
<span className='ui--AddressSmall-icon'>
|
||||
<IdentityIcon value={value as Uint8Array} />
|
||||
</span>
|
||||
|
||||
@ -36,7 +36,7 @@ function AddressToggle ({ address, className = '', filter, isHidden, noToggle, o
|
||||
|
||||
return (
|
||||
<StyledDiv
|
||||
className={`ui--AddressToggle ${className}${(value || noToggle) ? ' isAye' : ' isNay'}${isHidden || !isVisible ? ' isHidden' : ''}`}
|
||||
className={`${className} ui--AddressToggle ${(value || noToggle) ? 'isAye' : 'isNay'} ${isHidden || !isVisible ? 'isHidden' : ''}`}
|
||||
onClick={_onClick}
|
||||
>
|
||||
<AddressMini
|
||||
|
||||
@ -20,7 +20,7 @@ function AvailableDisplay ({ className = '', label, params }: Props): React.Reac
|
||||
|
||||
return (
|
||||
<Available
|
||||
className={`ui--Available ${className}`}
|
||||
className={`${className} ui--Available`}
|
||||
label={label}
|
||||
params={params}
|
||||
/>
|
||||
|
||||
@ -50,7 +50,7 @@ function Badge ({ className = '', color = 'normal', hover, hoverAction, icon, in
|
||||
return (
|
||||
<StyledDiv
|
||||
{...extraProps}
|
||||
className={`ui--Badge${hover ? ' isTooltip' : ''}${isBlock ? ' isBlock' : ''}${isSmall ? ' isSmall' : ''}${onClick ? ' isClickable' : ''}${isHighlight ? ' highlight--bg' : ''} ${color}Color ${className}${icon ? ' withIcon' : ''}${info ? ' withInfo' : ''}${hoverAction ? ' withAction' : ''} ${theme}Theme `}
|
||||
className={`${className} ui--Badge ${hover ? 'isTooltip' : ''} ${isBlock ? 'isBlock' : ''} ${isSmall ? 'isSmall' : ''} ${onClick ? 'isClickable' : ''} ${isHighlight ? 'highlight--bg' : ''} ${color}Color ${icon ? 'withIcon' : ''} ${info ? 'withInfo' : ''} ${hoverAction ? 'withAction' : ''} ${theme}Theme`}
|
||||
data-testid={badgeTestId}
|
||||
onClick={hoverAction ? undefined : onClick}
|
||||
>
|
||||
|
||||
@ -42,7 +42,7 @@ export function renderProvided ({ className = '', label, value }: RenderProps):
|
||||
|
||||
return (
|
||||
<FormatBalance
|
||||
className={`ui--Balance ${className}`}
|
||||
className={`${className} ui--Balance`}
|
||||
label={label}
|
||||
value={Array.isArray(value) ? value[0] : value}
|
||||
>
|
||||
@ -64,7 +64,7 @@ function BalanceDisplay (props: Props): React.ReactElement<Props> | null {
|
||||
? <>{renderProvided({ className, label, value: balance })}</>
|
||||
: (
|
||||
<BalanceFree
|
||||
className={`ui--Balance ${className}`}
|
||||
className={`${className} ui--Balance`}
|
||||
label={label}
|
||||
params={params}
|
||||
/>
|
||||
|
||||
@ -29,7 +29,7 @@ function BondedDisplay (props: Props): React.ReactElement<Props> | null {
|
||||
? <>{renderProvided({ className, label, value: bonded })}</>
|
||||
: (
|
||||
<Bonded
|
||||
className={`ui--Bonded ${className}`}
|
||||
className={`${className} ui--Bonded`}
|
||||
label={label}
|
||||
params={params}
|
||||
/>
|
||||
|
||||
@ -45,7 +45,7 @@ function Button ({ activeOnEnter, children, className = '', dataTestId = '', ico
|
||||
|
||||
return (
|
||||
<StyledButton
|
||||
className={`ui--Button${label ? ' hasLabel' : ''}${isBasic ? ' isBasic' : ''}${isCircular ? ' isCircular' : ''}${isFull ? ' isFull' : ''}${isIcon ? ' isIcon' : ''}${(isBusy || isDisabled) ? ' isDisabled' : ''}${isBusy ? ' isBusy' : ''}${isReadOnly ? ' isReadOnly' : ''}${isSelected ? ' isSelected' : ''}${isToplevel ? ' isToplevel' : ''}${withoutLink ? ' withoutLink' : ''} ${className}`}
|
||||
className={`${className} ui--Button ${label ? 'hasLabel' : ''} ${isBasic ? 'isBasic' : ''} ${isCircular ? 'isCircular' : ''} ${isFull ? 'isFull' : ''} ${isIcon ? 'isIcon' : ''} ${(isBusy || isDisabled) ? 'isDisabled' : ''} ${isBusy ? 'isBusy' : ''} ${isReadOnly ? 'isReadOnly' : ''}${isSelected ? 'isSelected' : ''} ${isToplevel ? 'isToplevel' : ''} ${withoutLink ? 'withoutLink' : ''}`}
|
||||
data-testid={dataTestId}
|
||||
onClick={_onClick}
|
||||
onMouseEnter={_onMouseEnter}
|
||||
|
||||
@ -8,7 +8,7 @@ import styled from 'styled-components';
|
||||
|
||||
function ButtonGroup ({ children, className = '', isCentered }: GroupProps): React.ReactElement<GroupProps> {
|
||||
return (
|
||||
<StyledDiv className={`ui--Button-Group${isCentered ? ' isCentered' : ''} ${className}`}>
|
||||
<StyledDiv className={`${className} ui--Button-Group ${isCentered ? 'isCentered' : ''}`}>
|
||||
{children}
|
||||
<div className='clear' />
|
||||
</StyledDiv>
|
||||
|
||||
@ -101,7 +101,7 @@ function Call ({ callName, children, className = '', labelHash, labelSignature,
|
||||
}, [callName, value, withHash, withSignature]);
|
||||
|
||||
return (
|
||||
<StyledDiv className={`ui--Call ${className}`}>
|
||||
<StyledDiv className={`${className} ui--Call`}>
|
||||
<Params
|
||||
isDisabled
|
||||
onError={onError}
|
||||
|
||||
@ -42,7 +42,7 @@ function CallExpander ({ children, className = '', isHeader, labelHash, labelSig
|
||||
const callName = `${section}.${method}`;
|
||||
|
||||
return (
|
||||
<div className={`ui--CallExpander ${className}`}>
|
||||
<div className={`${className} ui--CallExpander`}>
|
||||
<Expander
|
||||
isHeader={isHeader}
|
||||
isLeft
|
||||
|
||||
@ -14,7 +14,7 @@ interface Props {
|
||||
|
||||
function Card ({ children, className = '', isError, isSuccess, withBottomMargin }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<StyledArticle className={`ui--Card ${className}${(isError && !isSuccess) ? ' error' : ''}${(!isError && isSuccess) ? ' success' : ''}${withBottomMargin ? ' withBottomMargin' : ''}`}>
|
||||
<StyledArticle className={`${className} ui--Card ${(isError && !isSuccess) ? 'error' : ''} ${(!isError && isSuccess) ? 'success' : ''} ${withBottomMargin ? 'withBottomMargin' : ''}`}>
|
||||
{children}
|
||||
</StyledArticle>
|
||||
);
|
||||
|
||||
@ -8,7 +8,7 @@ import styled from 'styled-components';
|
||||
|
||||
function BaseChart ({ children, className = '' }: BaseProps): React.ReactElement<BaseProps> {
|
||||
return (
|
||||
<StyledDiv className={`ui--Chart ${className}`}>
|
||||
<StyledDiv className={`${className} ui--Chart`}>
|
||||
{children}
|
||||
</StyledDiv>
|
||||
);
|
||||
|
||||
@ -24,7 +24,7 @@ function Checkbox ({ className = '', isDisabled, label, onChange, value }: Props
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`ui--Checkbox${isDisabled ? ' isDisabled' : ''} ${className}`}
|
||||
className={`${className} ui--Checkbox ${isDisabled ? 'isDisabled' : ''}`}
|
||||
onClick={_onClick}
|
||||
>
|
||||
<Icon
|
||||
|
||||
@ -14,15 +14,6 @@ interface Props {
|
||||
size?: 'default' | 'small' | 'tiny';
|
||||
}
|
||||
|
||||
interface ColumnProps {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
type ColumarType = React.ComponentType<Props> & {
|
||||
Column: React.ComponentType<ColumnProps>;
|
||||
};
|
||||
|
||||
const MIN_WIDTH_DEFAULT = '1025px';
|
||||
const MIN_WIDTH_SMALL = '750px';
|
||||
const MIN_WIDTH_TINY = '550px';
|
||||
@ -60,7 +51,7 @@ const FLEX_OPTIONS = `
|
||||
|
||||
function Column ({ children, className = '' }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<div className={`ui--Column ${className}`}>
|
||||
<div className={`${className} ui--Column`}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
@ -68,13 +59,13 @@ function Column ({ children, className = '' }: Props): React.ReactElement<Props>
|
||||
|
||||
function Columar ({ children, className = '', is60, is100, isPadded = true, isReverse, size = 'default' }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<div className={`ui--Columar ${is100 ? 'is100' : (is60 ? 'is60' : 'is50')} ${isPadded ? 'isPadded' : ''} ${isReverse ? 'isReverse' : ''} ${size}Size ${className}`}>
|
||||
<StyledDiv className={`${className} ui--Columar ${is100 ? 'is100' : (is60 ? 'is60' : 'is50')} ${isPadded ? 'isPadded' : ''} ${isReverse ? 'isReverse' : ''} ${size}Size`}>
|
||||
{children}
|
||||
</div>
|
||||
</StyledDiv>
|
||||
);
|
||||
}
|
||||
|
||||
const ColumarStyled = React.memo(styled(Columar)`
|
||||
const StyledDiv = styled.div`
|
||||
&.isReverse {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
@ -140,8 +131,8 @@ const ColumarStyled = React.memo(styled(Columar)`
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
`) as unknown as ColumarType;
|
||||
`;
|
||||
|
||||
ColumarStyled.Column = Column;
|
||||
Columar.Column = Column;
|
||||
|
||||
export default ColumarStyled;
|
||||
export default Columar;
|
||||
|
||||
@ -40,7 +40,7 @@ function CopyButton ({ children, className = '', icon = 'copy', label, type, val
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={`ui--CopyButton ${className}`}>
|
||||
<div className={`${className} ui--CopyButton`}>
|
||||
<CopyToClipboard
|
||||
onCopy={_onCopy}
|
||||
text={value}
|
||||
|
||||
@ -24,7 +24,7 @@ function CryptoType ({ accountId, className = '', label = '' }: Props): React.Re
|
||||
}, [accountId]);
|
||||
|
||||
return (
|
||||
<div className={`ui--CryptoType ${className}`}>
|
||||
<div className={`${className} ui--CryptoType`}>
|
||||
{label}{type}
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -112,7 +112,7 @@ function BaseDropdown<Option extends DropdownItemProps> ({ allowAdd = false, chi
|
||||
? <SUIButton.Group>{dropdown}{children}</SUIButton.Group>
|
||||
: (
|
||||
<Labelled
|
||||
className={`ui--Dropdown ${className}`}
|
||||
className={`${className} ui--Dropdown`}
|
||||
isFull={isFull}
|
||||
label={label}
|
||||
labelExtra={labelExtra}
|
||||
|
||||
@ -19,7 +19,7 @@ interface Props {
|
||||
function EditButton ({ children, className = '', icon = 'edit', onClick }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<div
|
||||
className={`ui--EditButton ${className}`}
|
||||
className={`${className} ui--EditButton`}
|
||||
onClick={onClick}
|
||||
>
|
||||
{children}
|
||||
|
||||
@ -62,7 +62,7 @@ function Editor ({ className = '', code, isValid, onEdit }: Props): React.ReactE
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`ui-Editor ${className}${isValid === false ? ' invalid' : ''}`}
|
||||
className={`${className} ui-Editor ${isValid === false ? 'invalid' : ''}`}
|
||||
id={editorId}
|
||||
/>
|
||||
);
|
||||
|
||||
@ -78,7 +78,7 @@ function EventDisplay ({ children, className = '', eventName, value, withExpande
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={`ui--Event ${className}`}>
|
||||
<div className={`${className} ui--Event`}>
|
||||
{children}
|
||||
<Params
|
||||
isDisabled
|
||||
|
||||
@ -15,7 +15,7 @@ interface Props {
|
||||
function ExpandButton ({ className = '', expanded, onClick }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<div
|
||||
className={`ui--ExpandButton ${className}`}
|
||||
className={`${className} ui--ExpandButton`}
|
||||
data-testid='row-toggle'
|
||||
onClick={onClick}
|
||||
>
|
||||
|
||||
@ -98,7 +98,7 @@ function Expander ({ children, className = '', isHeader, isLeft, isOpen, isPadde
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={`ui--Expander${isExpanded ? ' isExpanded' : ''}${isHeader ? ' isHeader' : ''}${isPadded ? ' isPadded' : ''}${hasContent ? ' hasContent' : ''}${withBreaks ? ' withBreaks' : ''} ${className}`}>
|
||||
<div className={`${className} ui--Expander ${isExpanded ? 'isExpanded' : ''} ${isHeader ? 'isHeader' : ''} ${isPadded ? 'isPadded' : ''} ${hasContent ? 'hasContent' : ''} ${withBreaks ? 'withBreaks' : ''}`}>
|
||||
<div
|
||||
className={`ui--Expander-summary${isLeft ? ' isLeft' : ''}`}
|
||||
onClick={toggleExpanded}
|
||||
|
||||
@ -21,7 +21,7 @@ function HelpOverlay ({ className = '', md }: Props): React.ReactElement<Props>
|
||||
const [isVisible, toggleVisible] = useToggle();
|
||||
|
||||
return (
|
||||
<div className={`ui--HelpOverlay ${className}`}>
|
||||
<div className={`${className} ui--HelpOverlay`}>
|
||||
<div className='help-button'>
|
||||
<Icon
|
||||
icon='question-circle'
|
||||
|
||||
@ -38,7 +38,7 @@ function Icon ({ className = '', color = 'normal', icon, isPadded, isSpinning, o
|
||||
return (
|
||||
<FontAwesomeIcon
|
||||
{...extraProps}
|
||||
className={`ui--Icon ${color}Color${onClick ? ' isClickable' : ''}${isPadded ? ' isPadded' : ''} ${className}`}
|
||||
className={`${className} ui--Icon ${color}Color${onClick ? ' isClickable' : ''}${isPadded ? ' isPadded' : ''}`}
|
||||
icon={icon}
|
||||
onClick={onClick}
|
||||
size={size}
|
||||
|
||||
@ -17,7 +17,7 @@ interface Props {
|
||||
|
||||
function KeyPair ({ address, className = '' }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<StyledDiv className={`ui--KeyPair ${className}`}>
|
||||
<StyledDiv className={`${className} ui--KeyPair`}>
|
||||
<IdentityIcon
|
||||
className='icon'
|
||||
value={address}
|
||||
|
||||
@ -188,7 +188,7 @@ class InputAddress extends React.PureComponent<Props, State> {
|
||||
|
||||
return (
|
||||
<StyledDropdown
|
||||
className={`ui--InputAddress${hideAddress ? ' hideAddress' : ''} ${className}`}
|
||||
className={`${className} ui--InputAddress ${hideAddress ? 'hideAddress' : ''}`}
|
||||
defaultValue={_defaultValue}
|
||||
isDisabled={isDisabled}
|
||||
isError={isError}
|
||||
|
||||
@ -60,7 +60,7 @@ function InputAddressMulti ({ available, availableLabel, className = '', default
|
||||
);
|
||||
|
||||
return (
|
||||
<StyledDiv className={`ui--InputAddressMulti ${className}`}>
|
||||
<StyledDiv className={`${className} ui--InputAddressMulti`}>
|
||||
<Input
|
||||
autoFocus
|
||||
className='ui--InputAddressMulti-Input'
|
||||
|
||||
@ -72,7 +72,7 @@ function InputBalance ({ autoFocus, children, className = '', defaultValue: inDe
|
||||
<InputNumber
|
||||
autoFocus={autoFocus}
|
||||
bitLength={DEFAULT_BITLENGTH}
|
||||
className={`ui--InputBalance ${className}`}
|
||||
className={`${className} ui--InputBalance`}
|
||||
defaultValue={defaultValue}
|
||||
isDisabled={isDisabled}
|
||||
isError={isError}
|
||||
|
||||
@ -29,7 +29,7 @@ function SelectMethod ({ className = '', defs, isError, onChange, options, value
|
||||
|
||||
return (
|
||||
<Dropdown
|
||||
className={`ui--DropdownLinked-Items ${className}`}
|
||||
className={`${className} ui--DropdownLinked-Items`}
|
||||
isError={isError}
|
||||
onChange={onChange}
|
||||
options={options}
|
||||
|
||||
@ -20,7 +20,7 @@ interface Props {
|
||||
function SelectSection ({ className = '', defaultValue, isError, onChange, options, value }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<Dropdown
|
||||
className={`ui--DropdownLinked-Sections ${className}`}
|
||||
className={`${className} ui--DropdownLinked-Sections`}
|
||||
defaultValue={defaultValue}
|
||||
isError={isError}
|
||||
onChange={onChange}
|
||||
|
||||
@ -36,7 +36,7 @@ function SelectKey (props: Props): React.ReactElement<Props> | null {
|
||||
|
||||
return (
|
||||
<Dropdown
|
||||
className={`ui--DropdownLinked-Items ${className}`}
|
||||
className={`${className} ui--DropdownLinked-Items`}
|
||||
isError={isError}
|
||||
onChange={onChange}
|
||||
options={options}
|
||||
|
||||
@ -20,7 +20,7 @@ interface Props {
|
||||
function SelectSection ({ className = '', defaultValue, isError, onChange, options, value: { section } }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<Dropdown
|
||||
className={`ui--DropdownLinked-Sections ${className}`}
|
||||
className={`${className} ui--DropdownLinked-Sections`}
|
||||
defaultValue={defaultValue}
|
||||
isError={isError}
|
||||
onChange={onChange}
|
||||
|
||||
@ -34,7 +34,7 @@ function SelectMethod ({ api, className = '', defaultValue, isDisabled, isError,
|
||||
|
||||
return (
|
||||
<Dropdown
|
||||
className={`ui--DropdownLinked-Items ${className}`}
|
||||
className={`${className} ui--DropdownLinked-Items`}
|
||||
defaultValue={defaultValue}
|
||||
isDisabled={isDisabled}
|
||||
isError={isError}
|
||||
|
||||
@ -21,7 +21,7 @@ interface Props {
|
||||
function SelectSection ({ className = '', defaultValue, isDisabled, isError, onChange, options, value }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<Dropdown
|
||||
className={`ui--DropdownLinked-Sections ${className}`}
|
||||
className={`${className} ui--DropdownLinked-Sections`}
|
||||
defaultValue={defaultValue}
|
||||
isDisabled={isDisabled}
|
||||
isError={isError}
|
||||
|
||||
@ -100,7 +100,7 @@ function InputFile ({ accept, className = '', clearContent, isDisabled, isError
|
||||
ref={dropRef}
|
||||
>
|
||||
{({ getInputProps, getRootProps }): JSX.Element => (
|
||||
<div {...getRootProps({ className: `ui--InputFile${isError ? ' error' : ''} ${className}` })}>
|
||||
<div {...getRootProps({ className: `${className} ui--InputFile ${isError ? 'error' : ''}` })}>
|
||||
<input {...getInputProps()} />
|
||||
<em className='label'>
|
||||
{
|
||||
|
||||
@ -242,7 +242,7 @@ function InputNumber ({ autoFocus, bitLength = DEFAULT_BITLENGTH, children, clas
|
||||
return (
|
||||
<Input
|
||||
autoFocus={autoFocus}
|
||||
className={`ui--InputNumber${isDisabled ? ' isDisabled' : ''} ${className}`}
|
||||
className={`${className} ui--InputNumber ${isDisabled ? 'isDisabled' : ''}`}
|
||||
isDisabled={isDisabled}
|
||||
isError={!isValid || isError}
|
||||
isFull={isFull}
|
||||
|
||||
@ -31,7 +31,7 @@ function SelectMethod ({ className = '', isError, onChange, options, value }: Pr
|
||||
|
||||
return (
|
||||
<Dropdown
|
||||
className={`ui--DropdownLinked-Items ${className}`}
|
||||
className={`${className} ui--DropdownLinked-Items`}
|
||||
isError={isError}
|
||||
onChange={onChange}
|
||||
options={options}
|
||||
|
||||
@ -20,7 +20,7 @@ interface Props {
|
||||
function SelectSection ({ className = '', defaultValue, isError, onChange, options, value }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<Dropdown
|
||||
className={`ui--DropdownLinked-Sections ${className}`}
|
||||
className={`${className} ui--DropdownLinked-Sections`}
|
||||
defaultValue={defaultValue}
|
||||
isError={isError}
|
||||
onChange={onChange}
|
||||
|
||||
@ -38,7 +38,7 @@ function SelectKey (props: Props): React.ReactElement<Props> | null {
|
||||
|
||||
return (
|
||||
<Dropdown
|
||||
className={`ui--DropdownLinked-Items ${className}`}
|
||||
className={`${className} ui--DropdownLinked-Items`}
|
||||
isError={isError}
|
||||
onChange={onChange}
|
||||
options={options}
|
||||
|
||||
@ -20,7 +20,7 @@ interface Props {
|
||||
function SelectSection ({ className = '', defaultValue, isError, onChange, options, value: { creator: { section } } }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<Dropdown
|
||||
className={`ui--DropdownLinked-Sections ${className}`}
|
||||
className={`${className} ui--DropdownLinked-Sections`}
|
||||
defaultValue={defaultValue}
|
||||
isError={isError}
|
||||
onChange={onChange}
|
||||
|
||||
@ -61,7 +61,7 @@ function InputTags ({ allowAdd = true, className = '', defaultValue, isDisabled,
|
||||
return (
|
||||
<Dropdown
|
||||
allowAdd={allowAdd && !isDisabled}
|
||||
className={`ui--InputTags ${theme}Theme ${className}`}
|
||||
className={`${className} ui--InputTags ${theme}Theme`}
|
||||
defaultValue={defaultValue}
|
||||
isDisabled={isDisabled}
|
||||
isError={isError}
|
||||
|
||||
@ -38,7 +38,7 @@ function Inset ({ children, className = '', header, href, isCollapsible, isError
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`ui--Inset ${href ? ' as-link' : ''}${isCollapsible ? ' collapsible' : ''}${(isError && !isSuccess) ? ' error' : ''}${(!isError && isSuccess) ? ' success' : ''}${withBottomMargin ? ' bottom-margin' : ''}${withTopMargin ? ' top-margin' : ''} ${className}`}
|
||||
className={`${className} ui--Inset ${href ? 'as-link' : ''} ${isCollapsible ? 'collapsible' : ''} ${(isError && !isSuccess) ? 'error' : ''} ${(!isError && isSuccess) ? 'success' : ''} ${withBottomMargin ? 'bottom-margin' : ''} ${withTopMargin ? 'top-margin' : ''}`}
|
||||
>
|
||||
{isCollapsible && (
|
||||
<div
|
||||
|
||||
@ -22,7 +22,7 @@ function LabelHelp ({ className = '', help, icon = 'question-circle' }: Props):
|
||||
|
||||
return (
|
||||
<StyledDiv
|
||||
className={`ui--LabelHelp ${className}`}
|
||||
className={`${className} ui--LabelHelp`}
|
||||
tabIndex={-1}
|
||||
>
|
||||
<Icon
|
||||
|
||||
@ -29,7 +29,7 @@ function Labelled ({ className = '', children, isFull, isHidden, isOuter, isSmal
|
||||
}
|
||||
|
||||
return (
|
||||
<StyledDiv className={`ui--Labelled${isSmall ? ' isSmall' : ''}${isFull ? ' isFull' : ''}${isOuter ? ' isOuter' : ''} ${className}`}>
|
||||
<StyledDiv className={`${className} ui--Labelled ${isSmall ? 'isSmall' : ''} ${isFull ? 'isFull' : ''} ${isOuter ? 'isOuter' : ''}`}>
|
||||
<label>{withEllipsis
|
||||
? <div className='withEllipsis'>{label}</div>
|
||||
: label
|
||||
|
||||
@ -21,7 +21,7 @@ function LockedVoteDisplay ({ className = '', label, params }: Props): React.Rea
|
||||
|
||||
return (
|
||||
<LockedVote
|
||||
className={`ui--LockedVote ${className}`}
|
||||
className={`${className} ui--LockedVote`}
|
||||
label={label}
|
||||
params={params}
|
||||
/>
|
||||
|
||||
@ -14,7 +14,7 @@ interface Props {
|
||||
|
||||
function MarkError ({ children, className = '', content }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<StyledArticle className={`mark error ${className}`}>
|
||||
<StyledArticle className={`${className} mark error`}>
|
||||
<Icon icon='exclamation-triangle' />{content}{children}
|
||||
</StyledArticle>
|
||||
);
|
||||
|
||||
@ -15,7 +15,7 @@ interface Props {
|
||||
|
||||
function MarkWarning ({ children, className = '', content, withIcon = true }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<StyledArticle className={`mark warning ${className}`}>
|
||||
<StyledArticle className={`${className} mark warning`}>
|
||||
{withIcon && <Icon icon='exclamation-triangle' />}{content}{children}
|
||||
</StyledArticle>
|
||||
);
|
||||
|
||||
@ -8,7 +8,7 @@ import styled from 'styled-components';
|
||||
|
||||
function Base ({ children, className = '' }: BaseProps): React.ReactElement<BaseProps> {
|
||||
return (
|
||||
<StyledDiv className={`ui--Menu ${className}`}>
|
||||
<StyledDiv className={`${className} ui--Menu`}>
|
||||
{children}
|
||||
</StyledDiv>
|
||||
);
|
||||
|
||||
@ -8,7 +8,7 @@ import styled from 'styled-components';
|
||||
|
||||
function Divider ({ className = '' }: DividerProps): React.ReactElement {
|
||||
return (
|
||||
<StyledDiv className={`ui--Menu__Divider ${className}`} />
|
||||
<StyledDiv className={`${className} ui--Menu__Divider`} />
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ function Item ({ children, className = '', icon, isDisabled, label, onClick }: I
|
||||
|
||||
return (
|
||||
<StyledDiv
|
||||
className={`ui--Menu__Item ${className}${icon ? ' hasIcon' : ''}${isDisabled ? ' isDisabled' : ''}`}
|
||||
className={`${className} ui--Menu__Item ${icon ? 'hasIcon' : ''} ${isDisabled ? 'isDisabled' : ''}`}
|
||||
onClick={_onClick}
|
||||
>
|
||||
{icon && (
|
||||
|
||||
@ -32,7 +32,7 @@ function Base (props: ModalProps): React.ReactElement<ModalProps> {
|
||||
|
||||
return createPortal(
|
||||
<StyledDiv
|
||||
className={`${themeClassName} ui--Modal ${className} ${size}Size`}
|
||||
className={`${className} ui--Modal ${size}Size ${themeClassName} `}
|
||||
data-testid={testId}
|
||||
>
|
||||
<DisableGlobalScroll />
|
||||
|
||||
@ -8,7 +8,7 @@ import styled from 'styled-components';
|
||||
|
||||
function Columns ({ children, className = '', hint }: ColumnsProps): React.ReactElement<ColumnsProps> {
|
||||
return (
|
||||
<StyledDiv className={`ui--Modal-Columns ${className}`}>
|
||||
<StyledDiv className={`${className} ui--Modal-Columns`}>
|
||||
<div>{children}</div>
|
||||
{hint && (
|
||||
<div>{hint}</div>
|
||||
|
||||
@ -20,7 +20,7 @@ function NonceDisplay ({ className = '', label, params }: Props): React.ReactEle
|
||||
|
||||
return (
|
||||
<Nonce
|
||||
className={`ui--Nonce ${className}`}
|
||||
className={`${className} ui--Nonce`}
|
||||
label={label}
|
||||
params={params.toString()}
|
||||
/>
|
||||
|
||||
@ -28,7 +28,7 @@ function Password ({ autoFocus, children, className = '', defaultValue, isDisabl
|
||||
return (
|
||||
<Input
|
||||
autoFocus={autoFocus}
|
||||
className={`ui--Password ${className}`}
|
||||
className={`${className} ui--Password`}
|
||||
defaultValue={defaultValue}
|
||||
isDisabled={isDisabled}
|
||||
isError={isError}
|
||||
|
||||
@ -44,7 +44,7 @@ function Popup ({ children, className = '', closeOnScroll, isDisabled, onCloseAc
|
||||
}, [isOpen, onCloseAction]);
|
||||
|
||||
return (
|
||||
<StyledDiv className={`ui--Popup ${themeClassName} ${className}`}>
|
||||
<StyledDiv className={`${className} ui--Popup ${themeClassName}`}>
|
||||
{isOpen && (
|
||||
<PopupWindow
|
||||
position={position}
|
||||
|
||||
@ -48,7 +48,7 @@ function Progress ({ className = '', isBlurred, isDisabled, total, value }: Prop
|
||||
const drawAngle = (angle === 360) ? 360 : angle % 360;
|
||||
|
||||
return (
|
||||
<StyledDiv className={`ui--Progress ${isDisabled ? 'isDisabled' : ''} ${isBlurred ? '--tmp' : ''} ${className}`}>
|
||||
<StyledDiv className={`${className} ui--Progress ${isDisabled ? 'isDisabled' : ''} ${isBlurred ? '--tmp' : ''}`}>
|
||||
<div className='background highlight--bg' />
|
||||
<Clip
|
||||
angle={
|
||||
|
||||
@ -27,14 +27,14 @@ function ProposedAction ({ className = '', idNumber, proposal }: Props): React.R
|
||||
|
||||
if (!proposal) {
|
||||
return (
|
||||
<div className={`ui--ProposedAction ${className}`}>
|
||||
<div className={`${className} ui--ProposedAction`}>
|
||||
<div>{stringId ? `#${stringId}: ` : ''}{t<string>('No execution details available for this proposal')}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={`ui--ProposedAction ${className}`}>
|
||||
<div className={`${className} ui--ProposedAction`}>
|
||||
<CallExpander
|
||||
isHeader
|
||||
labelHash={t<string>('preimage')}
|
||||
|
||||
@ -44,7 +44,7 @@ function Row ({ address, buttons, children, className = '', defaultName, details
|
||||
}, [onSaveName, toggleIsEditingName]);
|
||||
|
||||
return (
|
||||
<StyledDiv className={`ui--Row${isDisabled ? ' isDisabled' : ''}${isInline ? ' isInline' : ''} ${className}`}>
|
||||
<StyledDiv className={`${className} ui--Row ${isDisabled ? 'isDisabled' : ''} ${isInline ? 'isInline' : ''}`}>
|
||||
<div className='ui--Row-base'>
|
||||
{icon && (
|
||||
<div className='ui--Row-icon'>
|
||||
|
||||
@ -20,7 +20,7 @@ interface Props {
|
||||
function Sidebar ({ button, children, className = '', dataTestId = '', onClose, position, sidebarRef }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<StyledDiv
|
||||
className={`ui--Sidebar ${className} ${position}Position`}
|
||||
className={`${className} ui--Sidebar ${position}Position`}
|
||||
data-testid={dataTestId}
|
||||
ref={sidebarRef}
|
||||
>
|
||||
|
||||
@ -18,7 +18,7 @@ interface Props {
|
||||
|
||||
function SortDropdown ({ className = '', defaultValue, label, onChange, onClick, options, sortDirection }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<StyledDiv className={`ui--Sort ${className}`}>
|
||||
<StyledDiv className={`${className} ui--Sort`}>
|
||||
<Dropdown
|
||||
defaultValue={defaultValue}
|
||||
label={label}
|
||||
|
||||
@ -171,7 +171,7 @@ function Status ({ className = '' }: Props): React.ReactElement<Props> | null {
|
||||
}
|
||||
|
||||
return (
|
||||
<StyledDiv className={`ui--Status ${className}`}>
|
||||
<StyledDiv className={`${className} ui--Status`}>
|
||||
{allTx.map(renderItem)}
|
||||
{allSt.map(renderStatus)}
|
||||
</StyledDiv>
|
||||
|
||||
@ -9,7 +9,7 @@ import { FormatBalance } from '@polkadot/react-query';
|
||||
|
||||
function Balance ({ className = '', value, withLoading }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<td className={`ui--Table-Column-Balance number ${className}`}>
|
||||
<td className={`${className} ui--Table-Column-Balance number`}>
|
||||
{value
|
||||
? <FormatBalance value={value} />
|
||||
: withLoading && (
|
||||
|
||||
@ -11,7 +11,7 @@ import Icon from '../../Icon';
|
||||
function Expand ({ className = '', isExpanded, toggle }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<StyledTd
|
||||
className={`ui--Table-Column-Expand ${className}`}
|
||||
className={`${className} ui--Table-Column-Expand`}
|
||||
onClick={toggle}
|
||||
>
|
||||
<div>
|
||||
|
||||
@ -16,7 +16,7 @@ function Favorite ({ address, className = '', isFavorite, toggle }: Props): Reac
|
||||
|
||||
return (
|
||||
<StyledTd
|
||||
className={`ui--Table-Column-Favorite ${className}`}
|
||||
className={`${className} ui--Table-Column-Favorite`}
|
||||
onClick={onClick}
|
||||
>
|
||||
<Icon
|
||||
|
||||
@ -10,7 +10,7 @@ import { formatNumber } from '@polkadot/util';
|
||||
|
||||
function Id ({ className = '', value }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<StyledTd className={`ui--Table-Column-Id ${className}`}>
|
||||
<StyledTd className={`${className} ui--Table-Column-Id`}>
|
||||
<h2 className='--digits'>{formatNumber(value)}</h2>
|
||||
</StyledTd>
|
||||
);
|
||||
|
||||
@ -51,7 +51,7 @@ function Table ({ children, className = '', empty, emptySpinner, filter, footer,
|
||||
const tableClassName = `${(isFixed && !isEmpty) ? 'isFixed' : 'isNotFixed'} ${isInline ? 'isInline' : ''} ${splitBody ? 'noMargin' : ''}`;
|
||||
|
||||
return (
|
||||
<StyledDiv className={`ui--Table ${className} ${splitBody ? 'isSplit' : ''}`}>
|
||||
<StyledDiv className={`${className} ui--Table ${splitBody ? 'isSplit' : ''}`}>
|
||||
{legend}
|
||||
{splitBody
|
||||
? (
|
||||
|
||||
@ -28,7 +28,7 @@ function Tab ({ basePath, className = '', count, hasParams, index, isExact, isRo
|
||||
return (
|
||||
<StyledNavLink
|
||||
activeClassName='tabLinkActive'
|
||||
className={`ui--Tab ${className}`}
|
||||
className={`${className} ui--Tab`}
|
||||
exact={tabIsExact}
|
||||
strict={tabIsExact}
|
||||
to={to}
|
||||
|
||||
@ -53,7 +53,7 @@ function Tabs ({ basePath, className = '', hidden, items }: Props): React.ReactE
|
||||
);
|
||||
|
||||
return (
|
||||
<StyledHeader className={`ui--Tabs ${className}`}>
|
||||
<StyledHeader className={`${className} ui--Tabs`}>
|
||||
<div className='tabs-container'>
|
||||
{text && icon && (
|
||||
<CurrentSection
|
||||
|
||||
@ -25,7 +25,7 @@ function Tag ({ className = '', color = 'theme', hover, label, size = 'small' }:
|
||||
|
||||
return (
|
||||
<StyledDiv
|
||||
className={`ui--Tag ${color}Color ${size}Size ${theme}Theme ${className}`}
|
||||
className={`${className} ui--Tag ${color}Color ${size}Size ${theme}Theme`}
|
||||
color={color || 'grey'}
|
||||
data-for={hover && trigger}
|
||||
data-tip={!!hover}
|
||||
|
||||
@ -46,7 +46,7 @@ function Tags ({ children, className = '', isEditable, isEditing, onChange, onSa
|
||||
);
|
||||
|
||||
return (
|
||||
<StyledDiv className={`ui--Tags ${className}`}>
|
||||
<StyledDiv className={`${className} ui--Tags`}>
|
||||
{withTitle && (
|
||||
<h5>{t<string>('Tags')}</h5>
|
||||
)}
|
||||
|
||||
@ -31,11 +31,11 @@ function Toggle ({ className = '', isDisabled, isRadio, label, onChange, prevent
|
||||
|
||||
return (
|
||||
<StyledDiv
|
||||
className={`ui--Toggle${value ? ' isChecked' : ''}${isDisabled ? ' isDisabled' : ''}${isRadio ? ' isRadio' : ''} ${className}`}
|
||||
className={`${className} ui--Toggle ${value ? 'isChecked' : ''} ${isDisabled ? 'isDisabled' : ''} ${isRadio ? 'isRadio' : ''}`}
|
||||
onClick={_onClick}
|
||||
>
|
||||
{label && <label>{label}</label>}
|
||||
<div className={`ui--Toggle-Slider${isRadio ? ' highlight--before-border' : ''}`} />
|
||||
<div className={`ui--Toggle-Slider ${isRadio ? 'highlight--before-border' : ''}`} />
|
||||
</StyledDiv>
|
||||
);
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ function ToggleGroup ({ className = '', onChange, options, value }: Props): Reac
|
||||
}
|
||||
|
||||
return (
|
||||
<StyledDiv className={`ui--ToggleGroup ${className}`}>
|
||||
<StyledDiv className={`${className} ui--ToggleGroup`}>
|
||||
{available.map(({ isDisabled, text }, index): React.ReactNode => (
|
||||
<ToggleIndexMemo
|
||||
index={index}
|
||||
|
||||
@ -40,7 +40,7 @@ function Tooltip ({ children, className = '', isClickable = false, place, text,
|
||||
|
||||
return createPortal(
|
||||
<StyledReactTooltip
|
||||
className={`ui--Tooltip ${className}`}
|
||||
className={`${className} ui--Tooltip`}
|
||||
clickable={isClickable}
|
||||
effect='solid'
|
||||
id={trigger}
|
||||
|
||||
@ -14,7 +14,7 @@ interface Props {
|
||||
|
||||
function Holder ({ children, className = '', withBorder, withExpander, withPadding }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<StyledDiv className={`ui--Params ${className}${withBorder ? ' withBorder' : ''}${withPadding ? ' withPadding' : ''}${withExpander ? ' withExpander' : ''}`}>
|
||||
<StyledDiv className={`${className} ui--Params ${withBorder ? 'withBorder' : ''} ${withPadding ? 'withPadding' : ''} ${withExpander ? 'withExpander' : ''}`}>
|
||||
{children}
|
||||
</StyledDiv>
|
||||
);
|
||||
|
||||
@ -10,7 +10,7 @@ interface Props {
|
||||
|
||||
function Bare ({ children, className = '' }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<div className={`ui--row --relative ${className}`}>
|
||||
<div className={`${className} ui--row --relative`}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -58,7 +58,7 @@ function Param ({ className = '', defaultValue, isDisabled, isError, isOptional,
|
||||
)
|
||||
: (
|
||||
<Component
|
||||
className={`ui--Param ${className}`}
|
||||
className={`${className} ui--Param`}
|
||||
defaultValue={defaultValue}
|
||||
isDisabled={isDisabled}
|
||||
isError={isError}
|
||||
|
||||
@ -17,7 +17,7 @@ interface DivProps {
|
||||
function div ({ className = '', key }: DivProps, ...values: React.ReactNode[]): React.ReactNode {
|
||||
return (
|
||||
<div
|
||||
className={`ui--Param-text ${className}`}
|
||||
className={`${className} ui--Param-text`}
|
||||
key={key}
|
||||
>
|
||||
{values}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user