File tree Expand file tree Collapse file tree 9 files changed +52
-19
lines changed Expand file tree Collapse file tree 9 files changed +52
-19
lines changed Original file line number Diff line number Diff line change 1
1
'use client' ;
2
2
3
+ import { ArrowRightIcon } from '@heroicons/react/24/solid' ;
3
4
import { captureException } from '@sentry/nextjs' ;
4
5
import { useTranslations } from 'next-intl' ;
5
6
import type { FC } from 'react' ;
@@ -37,7 +38,10 @@ const ErrorPage: FC<{ error: Error }> = ({ error }) => {
37
38
< p className = "-mt-4 max-w-sm text-center text-lg" >
38
39
{ t ( 'layouts.error.internalServerError.description' ) }
39
40
</ p >
40
- < Button href = "/" > { t ( 'layouts.error.backToHome' ) } </ Button >
41
+ < Button href = "/" >
42
+ { t ( 'layouts.error.backToHome' ) }
43
+ < ArrowRightIcon />
44
+ </ Button >
41
45
</ main >
42
46
</ CenteredLayout >
43
47
) ;
Original file line number Diff line number Diff line change 1
1
'use client' ;
2
2
3
+ import { ArrowRightIcon } from '@heroicons/react/24/solid' ;
3
4
import { useTranslations } from 'next-intl' ;
4
5
import type { FC } from 'react' ;
5
6
@@ -32,7 +33,10 @@ const NotFoundPage: FC = () => {
32
33
< p className = "-mt-4 max-w-sm text-center text-lg" >
33
34
{ t ( 'layouts.error.notFound.description' ) }
34
35
</ p >
35
- < Button href = "/" > { t ( 'layouts.error.backToHome' ) } </ Button >
36
+ < Button href = "/" >
37
+ { t ( 'layouts.error.backToHome' ) }
38
+ < ArrowRightIcon />
39
+ </ Button >
36
40
</ main >
37
41
</ CenteredLayout >
38
42
) ;
Original file line number Diff line number Diff line change 1
1
'use client' ;
2
2
3
+ import { ArrowRightIcon } from '@heroicons/react/24/solid' ;
3
4
import { captureException } from '@sentry/nextjs' ;
4
5
import ErrorComponent from 'next/error' ;
5
6
import type { FC } from 'react' ;
@@ -39,7 +40,10 @@ const GlobalErrorPage: FC<{ error: Error }> = ({ error }) => {
39
40
< p className = "-mt-4 max-w-sm text-center text-lg" >
40
41
This page has thrown a non-recoverable error.
41
42
</ p >
42
- < Button href = "/" > Back to Home</ Button >
43
+ < Button href = "/" >
44
+ Back to Home
45
+ < ArrowRightIcon />
46
+ </ Button >
43
47
</ main >
44
48
</ CenteredLayout >
45
49
</ BaseLayout >
Original file line number Diff line number Diff line change 1
1
.button {
2
2
@apply relative
3
+ inline-flex
4
+ items-center
5
+ gap-2
3
6
px-4.5
4
7
py-2.5
5
8
text-center
6
9
font-semibold;
7
10
11
+ svg {
12
+ @apply size-5;
13
+ }
14
+
8
15
& [aria-disabled = 'true' ] {
9
16
@apply cursor-not-allowed;
10
17
}
Original file line number Diff line number Diff line change
1
+ import { ArrowRightIcon } from '@heroicons/react/24/solid' ;
1
2
import type { Meta as MetaObj , StoryObj } from '@storybook/react' ;
2
3
3
4
import Button from '@/components/Common/Button' ;
@@ -37,4 +38,17 @@ export const Special: Story = {
37
38
} ,
38
39
} ;
39
40
41
+ export const WithIcon : Story = {
42
+ args : {
43
+ kind : 'primary' ,
44
+ children : (
45
+ < >
46
+ Back to Home
47
+ < ArrowRightIcon />
48
+ </ >
49
+ ) ,
50
+ disabled : false ,
51
+ } ,
52
+ } ;
53
+
40
54
export default { component : Button } as Meta ;
Original file line number Diff line number Diff line change 66
66
}
67
67
68
68
& > .action {
69
- @apply flex
70
- items-center
71
- gap-2
72
- px-3
69
+ @apply px-3
73
70
py-1.5
74
71
font-medium;
75
72
}
Original file line number Diff line number Diff line change 10
10
11
11
.previousButton ,
12
12
.nextButton {
13
- @apply flex
14
- items-center
15
- gap-2
16
- text-sm;
13
+ @apply text-sm;
17
14
}
18
15
19
16
.previousButton {
Original file line number Diff line number Diff line change 1
1
.downloadButton {
2
- @apply flex-row
3
- items-center
4
- justify-center
5
- gap-2;
2
+ @apply justify-center;
3
+
4
+ & .primary {
5
+ @apply inline-flex
6
+ dark:hidden;
7
+ }
8
+
9
+ & .special {
10
+ @apply hidden
11
+ dark:inline-flex;
12
+ }
6
13
7
14
svg {
8
- @apply size-5
9
- dark:opacity-50;
15
+ @apply dark:opacity-50;
10
16
}
11
17
}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ const DownloadButton: FC<PropsWithChildren<DownloadButtonProps>> = ({
25
25
< Button
26
26
kind = "special"
27
27
href = { downloadLink }
28
- className = { classNames ( styles . downloadButton , 'hidden dark:flex' ) }
28
+ className = { classNames ( styles . downloadButton , styles . special ) }
29
29
>
30
30
{ children }
31
31
@@ -35,7 +35,7 @@ const DownloadButton: FC<PropsWithChildren<DownloadButtonProps>> = ({
35
35
< Button
36
36
kind = "primary"
37
37
href = { downloadLink }
38
- className = { classNames ( styles . downloadButton , 'flex dark:hidden' ) }
38
+ className = { classNames ( styles . downloadButton , styles . primary ) }
39
39
>
40
40
{ children }
41
41
You can’t perform that action at this time.
0 commit comments