Files
pwap/pezkuwi-sdk-ui/packages/react-components/src/Sidebar.tsx
T
pezkuwichain 971df8edba Rebrand: Remove 3rd party chains, update domains to PezkuwiChain
- 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
2026-01-09 03:08:11 +03:00

73 lines
1.6 KiB
TypeScript

// Copyright 2017-2026 @pezkuwi/react-components authors & contributors
// SPDX-License-Identifier: Apache-2.0
import React from 'react';
import Button from './Button/index.js';
import { styled } from './styled.js';
interface Props {
buttons?: React.ReactNode;
children: React.ReactNode;
className?: string;
dataTestId?: string;
offset?: number | string;
onClose?: () => void;
position: 'left' | 'right';
sidebarRef: React.RefObject<HTMLDivElement>;
}
function Sidebar ({ buttons, children, className = '', dataTestId = '', onClose, position, sidebarRef }: Props): React.ReactElement<Props> {
return (
<StyledDiv
className={`${className} ui--Sidebar ${position}Position`}
data-testid={dataTestId}
ref={sidebarRef}
>
<Button.Group className='ui--Sidebar-buttons'>
{buttons}
<Button
dataTestId='close-sidebar-button'
icon='times'
isBasic
isCircular
onClick={onClose}
/>
</Button.Group>
{children}
</StyledDiv>
);
}
const StyledDiv = styled.div`
background: var(--bg-page);
bottom: 0;
margin-left: -0.125rem;
max-width: 24rem;
min-width: 24rem;
position: fixed;
padding: 1rem;
overflow-y: auto;
top: 0;
z-index: 999;
&.leftPosition {
box-shadow: 6px 0px 20px 0px rgba(0, 0, 0, 0.3);
left: 0;
}
&.rightPosition {
box-shadow: -6px 0px 20px 0px rgba(0, 0, 0, 0.3);
right: 0;
}
.ui--Sidebar-buttons {
margin: 0;
position: absolute;
right: 0.5rem;
top: 0.5rem;
}
`;
export default React.memo(Sidebar);