Files
stroy-bot-monorepo/src/webparts/stroyBot/shared/components/InlineIcon.tsx
T
Тимур Городецкий d606f8371c feat: weather conditions check from stroy-bot-main
Ports the weather check added to stroy-bot-main on 2026-10-16: daily
station weather, report positions with weather per shift and the AI
assessment of working conditions. Opens as ?page=weather&start=&end=
instead of the #weathercheck hash, and hub dates survive the way back.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 09:47:02 +05:00

40 lines
1.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import * as React from 'react';
// Иконки, которых пока нет в спрайте ui-kit (контуры из stroy-bot-main). Позже переедут в кит.
const ICON_PATHS = {
cloud: ['M17.5 19H7a5 5 0 1 1 1.02-9.9A6 6 0 0 1 19.5 11a4 4 0 0 1-2 8z'],
sparkle: [
'M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9z',
'M19 15l.8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8z'
]
} as const;
export type InlineIconName = keyof typeof ICON_PATHS;
/** Размер как у Icon size="sm" из ui-kit. */
const ICON_SIZE_PX = 16;
interface Props {
name: InlineIconName;
className?: string;
}
export const InlineIcon: React.FC<Props> = ({ name, className }) => (
<svg
className={className}
width={ICON_SIZE_PX}
height={ICON_SIZE_PX}
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth={1.5}
strokeLinecap="round"
strokeLinejoin="round"
aria-hidden="true"
>
{ICON_PATHS[name].map((path) => (
<path key={path} d={path} />
))}
</svg>
);