2020-10-15 03:13:36 +00:00
|
|
|
import React from 'react';
|
|
|
|
import tw from 'twin.macro';
|
2022-02-27 17:35:27 +00:00
|
|
|
import { Schedule } from '@definitions/user';
|
2020-10-15 03:13:36 +00:00
|
|
|
|
|
|
|
interface Props {
|
|
|
|
cron: Schedule['cron'];
|
|
|
|
className?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
const ScheduleCronRow = ({ cron, className }: Props) => (
|
|
|
|
<div css={tw`flex`} className={className}>
|
|
|
|
<div css={tw`w-1/5 sm:w-auto text-center`}>
|
|
|
|
<p css={tw`font-medium`}>{cron.minute}</p>
|
|
|
|
<p css={tw`text-2xs text-neutral-500 uppercase`}>Minute</p>
|
|
|
|
</div>
|
|
|
|
<div css={tw`w-1/5 sm:w-auto text-center ml-4`}>
|
|
|
|
<p css={tw`font-medium`}>{cron.hour}</p>
|
|
|
|
<p css={tw`text-2xs text-neutral-500 uppercase`}>Hour</p>
|
|
|
|
</div>
|
|
|
|
<div css={tw`w-1/5 sm:w-auto text-center ml-4`}>
|
|
|
|
<p css={tw`font-medium`}>{cron.dayOfMonth}</p>
|
|
|
|
<p css={tw`text-2xs text-neutral-500 uppercase`}>Day (Month)</p>
|
|
|
|
</div>
|
|
|
|
<div css={tw`w-1/5 sm:w-auto text-center ml-4`}>
|
2021-01-17 03:07:39 +00:00
|
|
|
<p css={tw`font-medium`}>{cron.month}</p>
|
2020-10-15 03:13:36 +00:00
|
|
|
<p css={tw`text-2xs text-neutral-500 uppercase`}>Month</p>
|
|
|
|
</div>
|
|
|
|
<div css={tw`w-1/5 sm:w-auto text-center ml-4`}>
|
|
|
|
<p css={tw`font-medium`}>{cron.dayOfWeek}</p>
|
|
|
|
<p css={tw`text-2xs text-neutral-500 uppercase`}>Day (Week)</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
export default ScheduleCronRow;
|