-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Styling new #8
Styling new #8
Conversation
month: 'short', | ||
}).format(executionDate)}{' '} | ||
{new Intl.DateTimeFormat('en-GB', { | ||
year: '2-digit', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jeg trooor(??) det er mulig å slå sammen datoformateringen til en DateTimeFormat. Kan du spesifisiere day, month og year i samme objekt?
@@ -16,18 +16,19 @@ export const SortButton: React.FC<{ | |||
flex="2" | |||
textAlign="left" | |||
fontSize={'sm'} | |||
_active={{ color: '#000000', fontWeight: 'semibold' }} | |||
//_active={{ color: '#000000', fontWeight: 'semibold' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skal dette bort?
@@ -51,8 +52,7 @@ export const TaskAccordionButton: React.FC<TaskAccordionButtonProps> = ({ | |||
justifyContent={'flex-end'} | |||
flexDirection={'row'} | |||
> | |||
|
|||
<Box flex="1">{new Date(executionTime)?.toLocaleString()}</Box> | |||
<DateFormatText executionDate={new Date(executionTime)} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Det ser ikke ut som det er så mye "React-logikk" i DateFormatText komponenten. Da liker jeg ofte å putte logikken (som her er datoformatering) i en egen util-funksjon, også kalle på funksjonen. f.eks:
<Box flex="1">{dinFormateringsFunksjon(new Date(executionTime))}</Box>
Button styling, Date format, Sort styling