* Add ui--Toggle overlay positioning * adjust label classes * Max bonded to unbond * Update packages/page-parachains/src/Parachain/Details.tsx * Update packages/page-parachains/src/Parachain/Deregister.tsx * Apply suggestions from code review * Adjust parachains * Adjust * Formatting * Additional
44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
// Copyright 2017-2020 @polkadot/react-components authors & contributors
|
|
// This software may be modified and distributed under the terms
|
|
// of the Apache-2.0 license. See the LICENSE file for details.
|
|
|
|
import React from 'react';
|
|
|
|
import Labelled from './Labelled';
|
|
|
|
interface Props {
|
|
children?: React.ReactNode;
|
|
className?: string;
|
|
defaultValue?: any;
|
|
help?: React.ReactNode;
|
|
isDisabled?: boolean;
|
|
isError?: boolean;
|
|
isFull?: boolean;
|
|
isHidden?: boolean;
|
|
isSmall?: boolean;
|
|
label?: React.ReactNode;
|
|
value?: React.ReactNode;
|
|
withLabel?: boolean;
|
|
}
|
|
|
|
function Static ({ children, className = '', defaultValue, help, isFull, isHidden, isSmall, label, value, withLabel }: Props): React.ReactElement<Props> {
|
|
return (
|
|
<Labelled
|
|
className={className}
|
|
help={help}
|
|
isFull={isFull}
|
|
isHidden={isHidden}
|
|
isSmall={isSmall}
|
|
label={label}
|
|
withLabel={withLabel}
|
|
>
|
|
<div className='ui--Static ui dropdown selection disabled'>
|
|
{value || defaultValue}
|
|
{children}
|
|
</div>
|
|
</Labelled>
|
|
);
|
|
}
|
|
|
|
export default React.memo(Static);
|