/
githubmirror
/
marktext
Обзор
Документация
Войти
/
githubmirror
/
marktext
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/website/src/components/Icons.tsx
156 строк
7 KB
Ran Luo
refactor(website): simplify landing page (helpers, types, data-driven blocks) (#4350)
02 июн 2026, 19:38
Не верифицирован
02 июн 2026, 19:38
1c7058a
Код
Авторство
О чём код?
import type { SVGProps } from 'react' type IconProps = SVGProps<SVGSVGElement> export const MoonIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}> <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" /> </svg> ) export const SunIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}> <circle cx="12" cy="12" r="4" /> <path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4" /> </svg> ) export const GitHubIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="currentColor" {...props}> <path d="M12 .5C5.73.5.5 5.74.5 12.02c0 5.08 3.29 9.39 7.86 10.91.58.1.79-.25.79-.56 0-.27-.01-1.16-.02-2.1-3.2.7-3.88-1.37-3.88-1.37-.52-1.33-1.28-1.69-1.28-1.69-1.05-.71.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.71 1.26 3.37.96.1-.75.4-1.26.73-1.55-2.56-.29-5.25-1.28-5.25-5.7 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.18 1.18a11 11 0 0 1 5.79 0c2.2-1.49 3.17-1.18 3.17-1.18.63 1.59.23 2.76.12 3.05.74.81 1.18 1.84 1.18 3.1 0 4.43-2.69 5.41-5.26 5.69.41.36.78 1.06.78 2.14 0 1.55-.01 2.79-.01 3.17 0 .31.21.67.8.56A11.53 11.53 0 0 0 23.5 12.02C23.5 5.74 18.27.5 12 .5z" /> </svg> ) export const DownloadIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props} > <path d="M12 3v12m0 0l-4-4m4 4l4-4M5 21h14" /> </svg> ) export const CheckIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round" {...props}> <path d="M20 6L9 17l-5-5" /> </svg> ) export const SearchIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" {...props}> <circle cx="11" cy="11" r="7" /> <path d="m21 21-4.3-4.3" /> </svg> ) export const MenuIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}> <path d="M4 6h16M4 12h16M4 18h10" /> </svg> ) export const BoltIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}> <path d="M13 2L3 14h9l-1 8 10-12h-9z" /> </svg> ) export const LinesIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}> <path d="M3 12h18M3 6h18M3 18h12" /> </svg> ) export const GridSmallIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}> <rect x="3" y="3" width="7" height="7" rx="1" /> <rect x="14" y="3" width="7" height="7" rx="1" /> <rect x="3" y="14" width="7" height="7" rx="1" /> </svg> ) export const TableIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}> <rect x="3" y="3" width="18" height="18" rx="2" /> <path d="M3 9h18M3 15h18M9 3v18M15 3v18" /> </svg> ) export const MathIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}> <path d="M4 19V5a2 2 0 0 1 2-2h2M20 5v14a2 2 0 0 1-2 2h-2M8 21H6M16 3h2" /> <path d="M9 12h6M12 9v6" /> </svg> ) export const DiagramIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}> <rect x="3" y="3" width="6" height="6" rx="1" /> <rect x="15" y="15" width="6" height="6" rx="1" /> <path d="M9 6h6a2 2 0 0 1 2 2v7" /> </svg> ) export const FootnoteIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}> <path d="m10 13-1 6 4-3 4 3-1-6" /> <path d="M16 8a4 4 0 1 1-8 0" /> <path d="M8 8V5a4 4 0 0 1 8 0v3" /> </svg> ) export const CodeIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}> <polyline points="16 18 22 12 16 6" /> <polyline points="8 6 2 12 8 18" /> </svg> ) export const FrontmatterIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}> <path d="M4 4h16v4H4zM4 12h10M4 16h10M4 20h6" /> </svg> ) export const TargetIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}> <circle cx="12" cy="12" r="3" /> <circle cx="12" cy="12" r="9" /> </svg> ) export const ExportIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}> <path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /> <path d="M14 2v6h6M12 18v-6M9 15l3 3 3-3" /> </svg> ) export const HeartIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="currentColor" {...props}> <path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" /> </svg> ) export const MacIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="currentColor" {...props}> <path d="M16.4 13.1c0-2.3 1.9-3.4 2-3.5-1.1-1.6-2.8-1.8-3.4-1.8-1.4-.1-2.8.9-3.5.9s-1.8-.8-3-.8c-1.5 0-2.9.9-3.7 2.3-1.6 2.7-.4 6.8 1.1 9 .7 1.1 1.6 2.3 2.7 2.2 1.1 0 1.5-.7 2.8-.7s1.7.7 2.8.7c1.2 0 1.9-1.1 2.6-2.1.8-1.2 1.2-2.4 1.2-2.4-.1 0-2.3-.9-2.3-3.5zM14.2 5.6c.6-.7 1-1.7.9-2.7-.9 0-1.9.6-2.5 1.3-.6.6-1 1.6-.9 2.6 1 .1 1.9-.5 2.5-1.2z" /> </svg> ) export const WindowsIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="currentColor" {...props}> <path d="M3 5.1 10.4 4v7.3H3zM11.3 3.9 21 2.5v8.8h-9.7zM3 12.7h7.4V20L3 18.9zM11.3 12.7H21v8.8l-9.7-1.4z" /> </svg> ) export const LinuxIcon = (props: IconProps) => ( <svg viewBox="0 0 24 24" fill="currentColor" {...props}> <path d="M12 2c-1.6 0-2.5 1.4-2.5 3 0 .8.2 1.4.2 2.1-.5.6-1.4 1.6-2 3.2-.6 1.5-.8 3.5-1.6 4.6-.6.8-1.4 1.3-1.4 2.1 0 .6.4 1 1 1.2-.1.5 0 1 .4 1.4.5.5 1.4.6 2.4.5.9.6 2 1 3.5 1s2.6-.4 3.5-1c1 .1 1.9 0 2.4-.5.4-.4.5-.9.4-1.4.6-.2 1-.6 1-1.2 0-.8-.8-1.3-1.4-2.1-.8-1.1-1-3.1-1.6-4.6-.6-1.6-1.5-2.6-2-3.2 0-.7.2-1.3.2-2.1 0-1.6-.9-3-2.5-3z" /> </svg> )