Skip to content

Commit

Permalink
feat: add icon to adaptor inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Oct 26, 2023
1 parent c1181ad commit a3a018b
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import getClassNameFactory from "../../../../lib/get-class-name-factory";
import styles from "../../styles.module.css";
import type { InputProps } from "../..";
import { ExternalInput } from "../../../ExternalInput";
import { Link } from "react-feather";

const getClassName = getClassNameFactory("Input", styles);

export const ExternalField = ({
field,
onChange,
readOnly,
value,
name,
label,
Expand All @@ -18,9 +18,13 @@ export const ExternalField = ({
}

return (
<div className={getClassName("")}>
<div className={getClassName()}>
<div className={getClassName("label")}>
{name === "_data" ? "External content" : label || name}
<div className={getClassName("labelIcon")}>
<Link size={16} />
</div>

{name === "_data" ? label || "External content" : label || name}
</div>
<ExternalInput field={field} onChange={onChange} value={value} />
</div>
Expand Down

0 comments on commit a3a018b

Please sign in to comment.