-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: formatting of deadline in permit signature page (#25321)
- Loading branch information
Showing
13 changed files
with
603 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from 'react'; | ||
|
||
import { ConfirmInfoRow } from './row'; | ||
import { ConfirmInfoRowDate } from './date'; | ||
|
||
const ConfirmInfoRowDateStory = { | ||
title: 'Components/App/Confirm/InfoRowDate', | ||
component: ConfirmInfoRowDate, | ||
|
||
decorators: [ | ||
(story) => <ConfirmInfoRow label="Date">{story()}</ConfirmInfoRow>, | ||
], | ||
|
||
argTypes: { | ||
url: { | ||
control: 'date', | ||
}, | ||
}, | ||
}; | ||
|
||
export const DefaultStory = ({ date }) => <ConfirmInfoRowDate date={date} />; | ||
DefaultStory.args = { | ||
date: 1633019124000, | ||
}; | ||
|
||
export default ConfirmInfoRowDateStory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react'; | ||
import { render } from '@testing-library/react'; | ||
|
||
import { ConfirmInfoRowDate } from './date'; | ||
|
||
describe('ConfirmInfoRowDate', () => { | ||
it('should match snapshot', () => { | ||
const { getByText } = render(<ConfirmInfoRowDate date={1633019124000} />); | ||
expect(getByText('30 September 2021, 16:25')).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
AlignItems, | ||
Display, | ||
FlexWrap, | ||
TextColor, | ||
} from '../../../../../helpers/constants/design-system'; | ||
import { formatUTCDate } from '../../../../../helpers/utils/util'; | ||
import { Box, Text } from '../../../../component-library'; | ||
|
||
export type ConfirmInfoRowDateProps = { | ||
date: number; | ||
}; | ||
|
||
export const ConfirmInfoRowDate = ({ date }: ConfirmInfoRowDateProps) => ( | ||
<Box | ||
display={Display.Flex} | ||
alignItems={AlignItems.center} | ||
flexWrap={FlexWrap.Wrap} | ||
gap={2} | ||
> | ||
<Text color={TextColor.inherit} style={{ whiteSpace: 'pre-wrap' }}> | ||
{formatUTCDate(date)} | ||
</Text> | ||
</Box> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.