Don't lowerCase RPC output labels (#8887)

This commit is contained in:
Jaco 2023-01-28 17:37:44 +02:00 committed by GitHub
parent fb8f7fe86b
commit 532c135e63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -4,6 +4,7 @@
import type { QueueTx } from '@polkadot/react-components/Status/types';
import React from 'react';
import styled from 'styled-components';
import { Output } from '@polkadot/react-components';
import valueToText from '@polkadot/react-params/valueToText';
@ -23,7 +24,7 @@ function Results ({ queue = [] }: Props): React.ReactElement<Props> | null {
}
return (
<section className='rpc--Results'>
<StyledSection className='rpc--Results'>
{filtered.map(({ error, id, result, rpc: { method, section, type } }): React.ReactNode => (
<Output
isError={!!error}
@ -36,8 +37,14 @@ function Results ({ queue = [] }: Props): React.ReactElement<Props> | null {
}
/>
))}
</section>
</StyledSection>
);
}
const StyledSection = styled.section`
.ui--Output > label {
text-transform: none;
}
`;
export default React.memo(Results);

View File

@ -29,7 +29,7 @@ interface Props {
function Output ({ children, className = '', isDisabled, isError, isFull, isHidden, isMonospace, isSmall, isTrimmed, label, labelExtra, value, withCopy = false, withLabel }: Props): React.ReactElement<Props> {
return (
<StyledLabelled
className={className}
className={`${className} ui--Output`}
isFull={isFull}
isHidden={isHidden}
isSmall={isSmall}