ghost-portal/packages/page-explorer/src/Event.tsx
Ewa Kowalska 541213f233
Ek extract type only imports into separate group (#4168)
* Plug new beta of eslint plugin simple import sort

* Apply new configuration to existing imports
2020-12-07 16:04:05 +01:00

31 lines
713 B
TypeScript

// Copyright 2017-2020 @polkadot/app-explorer authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { 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);