split pages CreateUpdatePost on two part and fixed button map
This commit is contained in:
28
src/components/ClearableField.jsx
Normal file
28
src/components/ClearableField.jsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import CloseIcon from "../components/icons/CloseIcon";
|
||||
|
||||
/**
|
||||
* ClearableField — обёртка над полем ввода, добавляющая справа крестик,
|
||||
* который полностью стирает содержимое поля.
|
||||
*
|
||||
* @param {function} onClear — очистить поле
|
||||
* @param {boolean} visible — показывать ли крестик (обычно наличие значения)
|
||||
* @param {ReactNode} children — само поле ввода (input / textarea)
|
||||
*/
|
||||
export default function ClearableField({ onClear, visible, children }) {
|
||||
return (
|
||||
<div className="f-clr-wrap">
|
||||
{children}
|
||||
{visible && (
|
||||
<button
|
||||
type="button"
|
||||
className="f-clr-btn"
|
||||
onClick={onClear}
|
||||
aria-label="Очистить"
|
||||
tabIndex={-1}
|
||||
>
|
||||
<CloseIcon />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -177,18 +177,6 @@ export default function NahodkaLogo({
|
||||
fill="none"
|
||||
/>
|
||||
|
||||
{/* Блик */}
|
||||
|
||||
<ellipse
|
||||
cx="-22"
|
||||
cy="-25"
|
||||
rx="8"
|
||||
ry="15"
|
||||
transform="rotate(35 -22 -25)"
|
||||
fill="white"
|
||||
opacity="0.65"
|
||||
/>
|
||||
|
||||
{/* ================================================= */}
|
||||
{/* ЛАПКА */}
|
||||
{/* ================================================= */}
|
||||
|
||||
Reference in New Issue
Block a user