mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-07-04 04:57:22 +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
55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
// Copyright 2017-2026 @pezkuwi/react-params authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { Registry, TypeDef } from '@pezkuwi/types/types';
|
|
import type { ComponentMap, RawParam, RawParamOnChangeValue, RawParams } from './types.js';
|
|
|
|
import React, { useCallback } from 'react';
|
|
|
|
import Param from './Param/index.js';
|
|
|
|
interface Props {
|
|
defaultValue: RawParam;
|
|
index: number;
|
|
isDisabled?: boolean;
|
|
isError?: boolean;
|
|
name?: string;
|
|
onChange: (index: number, value: RawParamOnChangeValue) => void;
|
|
onEnter?: () => void;
|
|
onEscape?: () => void;
|
|
overrides?: ComponentMap;
|
|
registry: Registry;
|
|
type: TypeDef;
|
|
values?: RawParams | null;
|
|
withLength?: boolean;
|
|
}
|
|
|
|
function ParamComp ({ defaultValue, index, isDisabled, isError, name, onChange, onEnter, onEscape, overrides, registry, type, withLength = true }: Props): React.ReactElement<Props> {
|
|
const _onChange = useCallback(
|
|
(value: RawParamOnChangeValue): void =>
|
|
onChange(index, value),
|
|
[index, onChange]
|
|
);
|
|
|
|
return (
|
|
<div className='ui--Param-composite'>
|
|
<Param
|
|
defaultValue={defaultValue}
|
|
isDisabled={isDisabled}
|
|
isError={isError}
|
|
key={`input:${index}`}
|
|
name={name}
|
|
onChange={_onChange}
|
|
onEnter={onEnter}
|
|
onEscape={onEscape}
|
|
overrides={overrides}
|
|
registry={registry}
|
|
type={type}
|
|
withLength={withLength}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default React.memo(ParamComp);
|