Skip to content
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

Merged
merged 8 commits into from
Aug 31, 2023
Merged

Styling new #8

merged 8 commits into from
Aug 31, 2023

Conversation

johannabjoremo
Copy link
Collaborator

Button styling, Date format, Sort styling

month: 'short',
}).format(executionDate)}{' '}
{new Intl.DateTimeFormat('en-GB', {
year: '2-digit',
Copy link
Contributor

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' }}
Copy link
Contributor

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)} />
Copy link
Contributor

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>

@johannabjoremo johannabjoremo merged commit b31a54a into main Aug 31, 2023
2 checks passed
@johannabjoremo johannabjoremo deleted the Styling-New branch December 11, 2023 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants