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)}>
<div className={'w-1/5 sm:w-auto text-center'}>
<p className={'font-medium'}>{cron.minute}</p>
<p className={'text-2xs text-neutral-500 uppercase'}>Minute</p>
2020-10-15 03:13:36 +00:00
</div>
<div className={'w-1/5 sm:w-auto text-center ml-4'}>
<p className={'font-medium'}>{cron.hour}</p>
<p className={'text-2xs text-neutral-500 uppercase'}>Hour</p>
2020-10-15 03:13:36 +00:00
</div>
<div className={'w-1/5 sm:w-auto text-center ml-4'}>
<p className={'font-medium'}>{cron.dayOfMonth}</p>
<p className={'text-2xs text-neutral-500 uppercase'}>Day (Month)</p>
2020-10-15 03:13:36 +00:00
</div>
<div className={'w-1/5 sm:w-auto text-center ml-4'}>
<p className={'font-medium'}>{cron.month}</p>
<p className={'text-2xs text-neutral-500 uppercase'}>Month</p>
2020-10-15 03:13:36 +00:00
</div>
<div className={'w-1/5 sm:w-auto text-center ml-4'}>
<p className={'font-medium'}>{cron.dayOfWeek}</p>
<p className={'text-2xs text-neutral-500 uppercase'}>Day (Week)</p>
2020-10-15 03:13:36 +00:00
</div>
</div>
);
export default ScheduleCronRow;