mirror of
https://github.com/pezkuwichain/pezkuwi-extension.git
synced 2026-11-21 05:20:01 +00:00
Update domain references to pezkuwichain.app and rebrand from polkadot
This commit is contained in:
commit
c2913a65d9
401 files changed
+23179
No files matched your search
@@ -0,0 +1,47 @@
|
||||
// Copyright 2019-2025 @pezkuwi/extension-ui authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React, { useCallback } from 'react';
|
||||
|
||||
import Label from './Label.js';
|
||||
import { TextArea } from './TextInputs.js';
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
isError?: boolean;
|
||||
isFocused?: boolean;
|
||||
isReadOnly?: boolean;
|
||||
rowsCount?: number;
|
||||
label: string;
|
||||
onChange?: (value: string) => void;
|
||||
value?: string;
|
||||
}
|
||||
|
||||
export default function TextAreaWithLabel ({ className, isError, isFocused, isReadOnly, label, onChange, rowsCount, value }: Props): React.ReactElement<Props> {
|
||||
const _onChange = useCallback(
|
||||
({ target: { value } }: React.ChangeEvent<HTMLTextAreaElement>): void => {
|
||||
onChange && onChange(value);
|
||||
},
|
||||
[onChange]
|
||||
);
|
||||
|
||||
return (
|
||||
<Label
|
||||
className={className}
|
||||
label={label}
|
||||
>
|
||||
<TextArea
|
||||
autoCapitalize='off'
|
||||
autoComplete='off'
|
||||
autoCorrect='off'
|
||||
autoFocus={isFocused}
|
||||
onChange={_onChange}
|
||||
readOnly={isReadOnly}
|
||||
rows={rowsCount || 2}
|
||||
spellCheck={false}
|
||||
value={value}
|
||||
withError={isError}
|
||||
/>
|
||||
</Label>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user