Skip to content

Instantly share code, notes, and snippets.

@d88naimi
Created September 13, 2021 15:57
Show Gist options
  • Save d88naimi/af0bf026f985007ebefbf928a6f7be78 to your computer and use it in GitHub Desktop.
Save d88naimi/af0bf026f985007ebefbf928a6f7be78 to your computer and use it in GitHub Desktop.
import React from "react";
import cx from "classnames";
import { CopyButton } from "../CopyButton";
import styles from "./CopyInput.less";
export const CopyInput = (props) => {
return (
<React.Fragment>
<label className={styles.CopyInput}>
<CopyButton
className={cx(styles.CopyButton, props.className)}
value={props.value}
kind={props.kind}
type={props.type}
size={props.size}
>
Copy
</CopyButton>
<input type="text" defaultValue={props.value} readOnly />
</label>
</React.Fragment>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment