PoweredByYouTube.tsx 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /**
  2. * "Powered by YouTube" 표시 컴포넌트.
  3. *
  4. * YouTube API Services — Developer Policies 의 branding 요구사항 준수:
  5. * YouTube API 로 가져온 데이터가 표시되는 영역에 attribution(저작권 표시)을 함께 노출.
  6. *
  7. * 사용처:
  8. * - 채널 상세 페이지 (구독자 수·영상 수·라이브 상태 표시 영역)
  9. * - 라이브 시청자 수 표시 영역
  10. * - 통합 채팅 (YouTube 출처 메시지 영역)
  11. *
  12. * 가이드라인: 공식 브랜드 색상(#FF0000) 사용, 최소 1.5em 높이, 가독성 있는 위치.
  13. */
  14. type Props = {
  15. className?: string;
  16. size?: 'sm'|'md';
  17. };
  18. export default function PoweredByYouTube({ className, size = 'sm' }: Props)
  19. {
  20. const height = size === 'sm' ? 14 : 18;
  21. const width = size === 'sm' ? 70 : 90;
  22. return (
  23. <span
  24. className={`inline-flex items-center gap-1 text-muted-foreground text-xs ${className ?? ''}`}
  25. aria-label="Powered by YouTube"
  26. >
  27. <span>Powered by</span>
  28. <svg
  29. width={width}
  30. height={height}
  31. viewBox="0 0 90 20"
  32. fill="none"
  33. xmlns="http://www.w3.org/2000/svg"
  34. role="img"
  35. aria-hidden="true"
  36. >
  37. <rect x="0" y="0" width="28" height="20" rx="4" fill="#FF0000"/>
  38. <path d="M11 6 L20 10 L11 14 Z" fill="#FFFFFF"/>
  39. <text x="32" y="15" fontFamily="Arial, Helvetica, sans-serif" fontSize="13" fontWeight="700" fill="currentColor">YouTube</text>
  40. </svg>
  41. </span>
  42. );
  43. }