forked from 77media/video-flow
64 lines
1.9 KiB
TypeScript
64 lines
1.9 KiB
TypeScript
import React from 'react';
|
|
|
|
/**
|
|
* 公共页脚组件
|
|
* 提供统一的版权信息和页脚样式
|
|
*/
|
|
export interface FooterProps {
|
|
/** 版权年份,默认为当前年份 */
|
|
year?: number;
|
|
/** 公司名称,默认为 "MovieFlow" */
|
|
companyName?: string;
|
|
/** 自定义版权文本 */
|
|
customText?: string;
|
|
/** 额外的CSS类名 */
|
|
className?: string;
|
|
/** 是否显示邮箱链接 */
|
|
showEmailLink?: boolean;
|
|
/** 邮箱地址,默认为 "support@movieflow.ai" */
|
|
emailAddress?: string;
|
|
}
|
|
|
|
/**
|
|
* 公共页脚组件
|
|
* @param props - 页脚组件属性
|
|
* @returns JSX元素
|
|
*/
|
|
const Footer: React.FC<FooterProps> = ({
|
|
year = new Date().getFullYear(),
|
|
companyName = 'MovieFlow',
|
|
customText,
|
|
className = '',
|
|
showEmailLink = false,
|
|
emailAddress = 'support@movieflow.ai'
|
|
}) => {
|
|
const copyrightText = customText || `© ${year} ${companyName}. All rights reserved.`;
|
|
|
|
return (
|
|
<div
|
|
data-alt="footer-component"
|
|
className={`home-module6 flex justify-center items-center w-full h-min text-white/50 text-lg bg-black snap-start px-4 ${className}`}
|
|
>
|
|
{/* 左侧版权信息 */}
|
|
<div className="text-center">
|
|
{copyrightText}
|
|
</div>
|
|
|
|
{/* 右侧邮箱链接 */}
|
|
{showEmailLink && (
|
|
<div className="flex-shrink-0 ml-4">
|
|
<a
|
|
href={`mailto:${emailAddress}`}
|
|
className="text-custom-blue hover:text-white/80 transition-colors duration-200 underline decoration-white/30 hover:decoration-white/60"
|
|
data-alt="support-email-link"
|
|
>
|
|
Contact Us
|
|
</a>
|
|
</div>
|
|
)}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Footer;
|