* Bumps w/ eslint * Additional * Additional * Additional * Additional * Remove style props * Additional * Additional * Additional * Additional (< 100) * eslint passes, tsc next * tsc fixes * Update deps * Update i18n
31 lines
797 B
TypeScript
31 lines
797 B
TypeScript
// Copyright 2017-2020 @polkadot/app-explorer 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 { EventRecord } from '@polkadot/types/interfaces';
|
|
|
|
import React from 'react';
|
|
import { Event as EventDisplay, Expander } from '@polkadot/react-components';
|
|
|
|
interface Props {
|
|
className?: string;
|
|
value: EventRecord;
|
|
}
|
|
|
|
function Event ({ className = '', value: { event } }: Props): React.ReactElement<Props> {
|
|
return (
|
|
<Expander
|
|
className={className}
|
|
summary={`${event.section}.${event.method}`}
|
|
summaryMeta={event.meta}
|
|
>
|
|
<EventDisplay
|
|
className='details'
|
|
value={event}
|
|
/>
|
|
</Expander>
|
|
);
|
|
}
|
|
|
|
export default React.memo(Event);
|