Skip to content

Commit

Permalink
Merge pull request #27 from docknetwork/copy-disabled-input-text
Browse files Browse the repository at this point in the history
Allow to copy text of the disabled input
  • Loading branch information
olegnn authored Aug 30, 2024
2 parents 27c1cfa + 2507f6d commit 86ff4e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/react-params/src/Param/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { Props } from '../types';

import React, { useCallback, useState } from 'react';

import { Input } from '@polkadot/react-components';
import { CopyButton, Input } from '@polkadot/react-components';

import Bare from './Bare';

Expand Down Expand Up @@ -41,7 +41,9 @@ function Text ({ className = '', defaultValue: { value }, isDisabled, isError, l
placeholder='<any string>'
type='text'
withLabel={withLabel}
/>
>
{isDisabled && <CopyButton value={defaultValue} />}
</Input>
</Bare>
);
}
Expand Down

0 comments on commit 86ff4e7

Please sign in to comment.