/
githubmirror
/
trpc
Обзор
Документация
Войти
/
githubmirror
/
trpc
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
www/src/components/YouTubeEmbed.tsx
21 строка
569 B
Christopher Ehrlich
docs: reorganize and write introductory articles (#4128)
01 май 2023, 23:17
Не верифицирован
01 май 2023, 23:17
061c49f
Код
Авторство
О чём код?
import React from 'react'; interface Props { videoId: string; title: string; } export const YouTubeEmbed = ({ videoId, title }: Props) => { return ( <div className="max-w-2xl"> <div className="relative pt-[56.25%]"> <iframe className="absolute left-0 top-0 h-full w-full" src={`https://www.youtube-nocookie.com/embed/${videoId}`} title={title} allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" ></iframe> </div> </div> ); };