misc_pterodactyl-panel/resources/scripts/components/server/schedules/ScheduleCronRow.tsx

35 lines
1.4 KiB
TypeScript
Raw Normal View History

2020-10-15 03:13:36 +00:00
import { Schedule } from '@/api/server/schedules/getServerSchedules';
import classNames from 'classnames';
2020-10-15 03:13:36 +00:00
interface Props {
cron: Schedule['cron'];
className?: string;
}
const ScheduleCronRow = ({ cron, className }: Props) => (
<div className={classNames('flex', className)}>
2023-01-12 19:31:47 +00:00
<div className={'w-1/5 text-center sm:w-auto'}>
<p className={'font-medium'}>{cron.minute}</p>
2023-01-12 19:31:47 +00:00
<p className={'text-2xs uppercase text-neutral-500'}>Minute</p>
2020-10-15 03:13:36 +00:00
</div>
2023-01-12 19:31:47 +00:00
<div className={'ml-4 w-1/5 text-center sm:w-auto'}>
<p className={'font-medium'}>{cron.hour}</p>
2023-01-12 19:31:47 +00:00
<p className={'text-2xs uppercase text-neutral-500'}>Hour</p>
2020-10-15 03:13:36 +00:00
</div>
2023-01-12 19:31:47 +00:00
<div className={'ml-4 w-1/5 text-center sm:w-auto'}>
<p className={'font-medium'}>{cron.dayOfMonth}</p>
2023-01-12 19:31:47 +00:00
<p className={'text-2xs uppercase text-neutral-500'}>Day (Month)</p>
2020-10-15 03:13:36 +00:00
</div>
2023-01-12 19:31:47 +00:00
<div className={'ml-4 w-1/5 text-center sm:w-auto'}>
<p className={'font-medium'}>{cron.month}</p>
2023-01-12 19:31:47 +00:00
<p className={'text-2xs uppercase text-neutral-500'}>Month</p>
2020-10-15 03:13:36 +00:00
</div>
2023-01-12 19:31:47 +00:00
<div className={'ml-4 w-1/5 text-center sm:w-auto'}>
<p className={'font-medium'}>{cron.dayOfWeek}</p>
2023-01-12 19:31:47 +00:00
<p className={'text-2xs uppercase text-neutral-500'}>Day (Week)</p>
2020-10-15 03:13:36 +00:00
</div>
</div>
);
export default ScheduleCronRow;