mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-07-24 12:25:43 +00:00
feat: initial Pezkuwi Apps rebrand from polkadot-apps
Rebranded terminology: - Polkadot → Pezkuwi - Kusama → Dicle - Westend → Zagros - Rococo → PezkuwiChain - Substrate → Bizinikiwi - parachain → teyrchain Custom logos with Kurdistan brand colors (#e6007a → #86e62a): - bizinikiwi-hexagon.svg - sora-bizinikiwi.svg - hezscanner.svg - heztreasury.svg - pezkuwiscan.svg - pezkuwistats.svg - pezkuwiassembly.svg - pezkuwiholic.svg
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
// Copyright 2017-2025 @pezkuwi/app-contracts authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { CallResult } from './types.js';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { Button, IdentityIcon, Output, styled } from '@pezkuwi/react-components';
|
||||
import valueToText from '@pezkuwi/react-params/valueToText';
|
||||
|
||||
import MessageSignature from '../shared/MessageSignature.js';
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
onClear?: () => void;
|
||||
outcome: CallResult;
|
||||
}
|
||||
|
||||
function Outcome ({ className = '', onClear, outcome: { from, message, output, params, result, when } }: Props): React.ReactElement<Props> | null {
|
||||
return (
|
||||
<StyledDiv className={className}>
|
||||
<IdentityIcon value={from} />
|
||||
<Output
|
||||
className='output'
|
||||
isError={!result.isOk}
|
||||
isFull
|
||||
label={
|
||||
<MessageSignature
|
||||
message={message}
|
||||
params={params}
|
||||
/>
|
||||
}
|
||||
labelExtra={
|
||||
<span className='date-time'>
|
||||
{when.toLocaleDateString()}
|
||||
{' '}
|
||||
{when.toLocaleTimeString()}
|
||||
</span>
|
||||
}
|
||||
value={valueToText('Text', result.isOk ? output : result)}
|
||||
/>
|
||||
<Button
|
||||
icon='times'
|
||||
onClick={onClear}
|
||||
/>
|
||||
</StyledDiv>
|
||||
);
|
||||
}
|
||||
|
||||
const StyledDiv = styled.div`
|
||||
align-items: center;
|
||||
display: flex;
|
||||
|
||||
.output {
|
||||
flex: 1 1;
|
||||
margin: 0.25rem 0.5rem;
|
||||
}
|
||||
`;
|
||||
|
||||
export default React.memo(Outcome);
|
||||
Reference in New Issue
Block a user