mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-16 23:03:06 +00:00
fixed TempInput classes being overwritten
This commit is contained in:
1 parent
13c8e04f07
commit
a8c884d630
2 files changed
+6
-3
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import React, { useCallback, useEffect, useRef, useState } from "react";
|
||||
import Input from "../Input";
|
||||
import { TempInput as Input } from 'components/common';
|
||||
// import Input from "../Input";
|
||||
import { faSearch } from "@fortawesome/pro-solid-svg-icons";
|
||||
import MasonryGrid from "../MasonryGrid/MasonryGrid";
|
||||
import "./Searcher.scss";
|
||||
@@ -106,7 +107,7 @@ export default function Searcher({
|
||||
placeholder="Search..."
|
||||
value={searchTerm[searcherKey]}
|
||||
onChange={handleInputChange}
|
||||
className="mb-3"
|
||||
type="text"
|
||||
/>
|
||||
<div
|
||||
className={`searcher-container ${
|
||||
|
||||
@@ -5,6 +5,7 @@ import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
||||
import "./Input.scss";
|
||||
|
||||
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
||||
className?: string;
|
||||
icon?: IconDefinition;
|
||||
invalidReason?: string;
|
||||
label?: string;
|
||||
@@ -13,6 +14,7 @@ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
||||
}
|
||||
|
||||
export default function TempInput({
|
||||
className,
|
||||
label,
|
||||
icon,
|
||||
invalidReason,
|
||||
@@ -28,7 +30,7 @@ export default function TempInput({
|
||||
{icon && (
|
||||
<FontAwesomeIcon icon={icon} className="form-control-feedback" />
|
||||
)}
|
||||
<input className="form-control" {...rest} />
|
||||
<input {...{ className: `form-control${ className ? " " + className : "" }`, ...rest }} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user