文件操作 - index.tsx
返回文件管理
返回主菜单
删除本文件
文件: /home/www/public/wp-content/plugins/give/src/Admin/components/Header/index.tsx
编辑文件内容
import React from 'react'; import styles from './styles.module.scss'; /** * @since 4.4.0 */ type HeaderProps = { children?: React.ReactNode; title: string; subtitle?: string; href?: string; actionText?: string; actionOnClick?: () => void; }; /** * @since 4.4.0 */ export default function Header({title, subtitle, href, actionText, actionOnClick}: HeaderProps) { return ( <header className={styles.header}> <div> <HeaderText>{title}</HeaderText> {subtitle && <SubHeaderText>{subtitle}</SubHeaderText>} </div> {href && !actionOnClick && ( <a className={styles.action} href={href} rel={'noreferrer'} aria-label={`${actionText} for ${title}`}> {actionText} </a> )} {actionOnClick && !href && ( <button className={styles.action} onClick={actionOnClick} aria-label={`${actionText} for ${title}`}> {actionText} </button> )} </header> ); } /** * @since 4.4.0 */ export function HeaderText({children}: {children: React.ReactNode}) { return <h2 className={styles.headerText}>{children}</h2>; } /** * @since 4.4.0 */ export function SubHeaderText({children}: {children: React.ReactNode}) { return <p className={styles.subHeaderText}>{children}</p>; }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件