36 lines
3.2 KiB
TypeScript
36 lines
3.2 KiB
TypeScript
import type { ReactNode } from "react";
|
|
|
|
// иконки дизайн-системы: React-SVG 24x24, штрих currentColor 1.5; без dangerouslySetInnerHTML
|
|
export type IconProps = { size?: 16 | 20 };
|
|
|
|
function make(children: ReactNode) {
|
|
return ({ size = 20 }: IconProps) => (
|
|
<svg aria-hidden="true" width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">{children}</svg>
|
|
);
|
|
}
|
|
|
|
export const IconRefresh = make(<><path d="M20 11a8 8 0 1 0-2.3 5.7"/><path d="M20 4v7h-7"/></>);
|
|
export const IconUpload = make(<><path d="M12 16V4"/><path d="M7 9l5-5 5 5"/><path d="M4 20h16"/></>);
|
|
export const IconMore = make(<><circle cx="5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/></>);
|
|
export const IconClose = make(<><path d="M6 6l12 12M18 6L6 18"/></>);
|
|
export const IconChevronDown = make(<><path d="M6 9l6 6 6-6"/></>);
|
|
export const IconSearch = make(<><circle cx="11" cy="11" r="6.5"/><path d="M20 20l-4.2-4.2"/></>);
|
|
export const IconFilter = make(<><path d="M4 5h16l-6 8v6l-4-2v-4z"/></>);
|
|
export const IconSun = make(<><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></>);
|
|
export const IconMoon = make(<><path d="M20 14.5A8 8 0 0 1 9.5 4 8 8 0 1 0 20 14.5z"/></>);
|
|
export const IconExternal = make(<><path d="M14 4h6v6"/><path d="M20 4l-9 9"/><path d="M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"/></>);
|
|
export const IconWarning = make(<><path d="M12 3.5l9.5 16.5h-19z"/><path d="M12 10v5M12 17.5v.5"/></>);
|
|
export const IconCheck = make(<><path d="M5 12.5l4.5 4.5L19 7.5"/></>);
|
|
export const IconError = make(<><circle cx="12" cy="12" r="9"/><path d="M9 9l6 6M15 9l-6 6"/></>);
|
|
export const IconInfo = make(<><circle cx="12" cy="12" r="9"/><path d="M12 11v5M12 7.5v.5"/></>);
|
|
export const IconHandoff = make(<><path d="M4 8h13"/><path d="M13 4l4 4-4 4"/><path d="M20 16H7"/><path d="M11 12l-4 4 4 4"/></>);
|
|
export const IconCritical = make(<><path d="M13 3L5 13.5h6L10 21l8-10.5h-6z"/></>);
|
|
export const IconCalendar = make(<><rect x="4" y="5" width="16" height="15" rx="2"/><path d="M4 10h16M8 3v4M16 3v4"/></>);
|
|
export const IconNeighbors = make(<><circle cx="12" cy="12" r="2.5"/><circle cx="5" cy="6" r="2"/><circle cx="19" cy="6" r="2"/><circle cx="12" cy="20" r="1.5"/><path d="M10 10.5L6.5 7.5M14 10.5l3.5-3M12 14.5v4"/></>);
|
|
export const IconLink = make(<><path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1"/><path d="M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/></>);
|
|
export const IconGrid = make(<><rect x="4" y="4" width="6.5" height="6.5" rx="1"/><rect x="13.5" y="4" width="6.5" height="6.5" rx="1"/><rect x="4" y="13.5" width="6.5" height="6.5" rx="1"/><rect x="13.5" y="13.5" width="6.5" height="6.5" rx="1"/></>);
|
|
export const IconReset = make(<><path d="M4 12a8 8 0 1 1 2.3 5.7"/><path d="M4 19v-7h7"/></>);
|
|
export const IconLegend = make(<><path d="M9 6h11M9 12h11M9 18h11"/><circle cx="4.5" cy="6" r=".8"/><circle cx="4.5" cy="12" r=".8"/><circle cx="4.5" cy="18" r=".8"/></>);
|
|
export const IconOpen = make(<><path d="M5 12h14"/><path d="M13 6l6 6-6 6"/></>);
|