mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-07-30 14:45:39 +00:00
971df8edba
- Remove all 3rd party parachain configurations from endpoints: - productionRelayPolkadot.ts: Keep only system parachains - productionRelayDicle.ts: Keep only system parachains - testingRelayZagros.ts: Keep only system parachains - testingRelayTeyrChain.ts: Keep only system parachains - Update domain references: - polkadot.js.org → pezkuwichain.app - wiki.polkadot.network → wiki.pezkuwichain.io - dotapps.io → pezkuwichain.app - statement.polkadot.network → docs.pezkuwichain.io/statement - support.polkadot.network → docs.pezkuwichain.io - Update repository references: - github.com/pezkuwi-js/apps → github.com/pezkuwichain/pwap - Rename system parachains to Pezkuwi ecosystem: - PolkadotAssetHub → PezkuwiAssetHub - polkadotBridgeHub → pezkuwiBridgeHub - polkadotCollectives → pezkuwiCollectives - polkadotCoretime → pezkuwiCoretime - polkadotPeople → pezkuwiPeople - Update network name in claims utility: - Polkadot → Pezkuwi
92 lines
1.9 KiB
TypeScript
92 lines
1.9 KiB
TypeScript
// Copyright 2017-2026 @pezkuwi/react-components authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import React from 'react';
|
|
import ReactMd from 'react-markdown';
|
|
import rehypeRaw from 'rehype-raw';
|
|
|
|
import { useToggle } from '@pezkuwi/react-hooks';
|
|
|
|
import Icon from './Icon.js';
|
|
import { styled } from './styled.js';
|
|
|
|
interface Props {
|
|
className?: string;
|
|
md: string;
|
|
}
|
|
|
|
const rehypePlugins = [rehypeRaw];
|
|
|
|
function HelpOverlay ({ className = '', md }: Props): React.ReactElement<Props> {
|
|
const [isVisible, toggleVisible] = useToggle();
|
|
|
|
return (
|
|
<StyledDiv className={`${className} ui--HelpOverlay`}>
|
|
<div className='help-button'>
|
|
<Icon
|
|
icon='question-circle'
|
|
onClick={toggleVisible}
|
|
/>
|
|
</div>
|
|
<div className={`help-slideout ${isVisible ? 'open' : 'closed'}`}>
|
|
<div className='help-button'>
|
|
<Icon
|
|
icon='times'
|
|
onClick={toggleVisible}
|
|
/>
|
|
</div>
|
|
<ReactMd
|
|
className='help-content'
|
|
rehypePlugins={rehypePlugins}
|
|
>
|
|
{md}
|
|
</ReactMd>
|
|
</div>
|
|
</StyledDiv>
|
|
);
|
|
}
|
|
|
|
const StyledDiv = styled.div`
|
|
.help-button {
|
|
color: var(--color-text);
|
|
cursor: pointer;
|
|
font-size: 2rem;
|
|
padding: 0.35rem 1.5rem 0 0;
|
|
}
|
|
|
|
> .help-button {
|
|
position: absolute;
|
|
right: 0rem;
|
|
top: 0rem;
|
|
z-index: 10;
|
|
}
|
|
|
|
.help-slideout {
|
|
background: var(--bg-page);
|
|
box-shadow: -6px 0px 20px 0px rgba(0, 0, 0, 0.3);
|
|
bottom: 0;
|
|
max-width: 50rem;
|
|
overflow-y: scroll;
|
|
position: fixed;
|
|
right: -50rem;
|
|
top: 0;
|
|
transition-duration: .5s;
|
|
transition-property: all;
|
|
z-index: 225; /* 5 more than menubar */
|
|
|
|
.help-button {
|
|
text-align: right;
|
|
}
|
|
|
|
.help-content {
|
|
padding: 1rem 1.5rem 5rem;
|
|
}
|
|
|
|
&.open {
|
|
right: 0;
|
|
}
|
|
}
|
|
`;
|
|
|
|
export default React.memo(HelpOverlay);
|