File tree Expand file tree Collapse file tree 13 files changed +37
-26
lines changed Expand file tree Collapse file tree 13 files changed +37
-26
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ const Button = ({
17
17
if ( color === 'primary' ) {
18
18
return 'text-white bg-blue-700 hover:bg-blue-800 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800'
19
19
}
20
+ if ( variant === 'outlined' ) {
21
+ return 'text-blue-700 border border-blue-700 hover:bg-blue-700 hover:text-white focus:ring-blue-300 dark:text-blue-600 dark:border-blue-600 dark:hover:bg-blue-600 dark:hover:text-white dark:focus:ring-blue-800'
22
+ }
20
23
if ( color === 'transparent' ) {
21
24
return 'focus:ring-transparent'
22
25
}
Original file line number Diff line number Diff line change
1
+ import Button from './Button'
2
+
1
3
type ErrorFallbackProps = {
2
4
error : Error
3
5
resetErrorBoundary : ( ) => void
@@ -11,7 +13,7 @@ export default function ErrorFallback({
11
13
< div role = "alert" >
12
14
< p > Something went wrong:</ p >
13
15
< pre > { error . message } </ pre >
14
- < button onClick = { resetErrorBoundary } > Try again</ button >
16
+ < Button onClick = { resetErrorBoundary } > Try again</ Button >
15
17
</ div >
16
18
)
17
19
}
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ export default function ExpandingTextarea({
23
23
24
24
React . useLayoutEffect ( ( ) => {
25
25
if ( textareaRef . current ) {
26
- textareaRef . current . style . height = 'inherit'
27
26
// Set height
28
27
textareaRef . current . style . height = `${ Math . max (
29
28
textareaRef . current . scrollHeight ,
Original file line number Diff line number Diff line change 1
1
import { graphql , usePaginationFragment } from 'react-relay'
2
+ import Button from 'src/components/Button'
2
3
import { BadgeList_user$key } from '../../../queries/__generated__/BadgeList_user.graphql'
3
4
import Badge from './Badge'
4
5
@@ -35,14 +36,13 @@ const BadgeList = ({ user }: { user: BadgeList_user$key }) => {
35
36
( badge ) => badge && < Badge key = { badge . node . id } badge = { badge . node } />
36
37
) }
37
38
{ hasNext ? (
38
- < button
39
- className = "text-gray-600 dark:text-gray-300"
39
+ < Button
40
40
onClick = { ( ) => {
41
41
loadNext ( 2 )
42
42
} }
43
43
>
44
44
Load more
45
- </ button >
45
+ </ Button >
46
46
) : null }
47
47
</ div >
48
48
)
Original file line number Diff line number Diff line change @@ -57,14 +57,18 @@ const Bio = ({ user }: BioProps) => {
57
57
disabled = { isMutationInFlight }
58
58
defaultValue = { data . bio }
59
59
/>
60
- < button onClick = { ( ) => setEditMode ( false ) } >
60
+ < button type = "button" onClick = { ( ) => setEditMode ( false ) } >
61
61
< GoCheck />
62
62
</ button >
63
63
</ div >
64
64
) : (
65
65
< div className = "flex justify-between" >
66
66
< span > { data . bio } </ span >
67
- < button className = "ml-4" onClick = { ( ) => setEditMode ( true ) } >
67
+ < button
68
+ type = "button"
69
+ className = "ml-4"
70
+ onClick = { ( ) => setEditMode ( true ) }
71
+ >
68
72
< GoPencil />
69
73
</ button >
70
74
</ div >
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ const Comments = ({ story }: CommentsProps) => {
42
42
) }
43
43
{ hasNext ? (
44
44
< button
45
+ type = "button"
45
46
className = "text-gray-600 dark:text-gray-300"
46
47
onClick = { ( ) => {
47
48
loadNext ( 2 )
Original file line number Diff line number Diff line change @@ -55,14 +55,15 @@ export default function StoryPreviewFooter({ story }: StoryPreviewFooterProps) {
55
55
{ data . reactions . hasViewerAssociation ? (
56
56
< div className = "flex items-center" >
57
57
< span > { data . reactions . totalCount } </ span >
58
- < button onClick = { ( ) => handleReaction ( ) } >
58
+ < button onClick = { ( ) => handleReaction ( ) } type = "button" >
59
59
< RiHeart3Fill />
60
60
</ button >
61
61
</ div >
62
62
) : (
63
63
< div >
64
64
< span > { data . reactions . totalCount } </ span >
65
65
< button
66
+ type = "button"
66
67
onClick = { ( ) => handleReaction ( ) }
67
68
disabled = { isMutationInFlight }
68
69
>
Original file line number Diff line number Diff line change @@ -71,12 +71,14 @@ const IssuesFromLastRepo = ({ user }: IssuesFromLastRepoProps) => {
71
71
) }
72
72
</ div >
73
73
< button
74
+ type = "button"
74
75
className = "absolute right-8 bottom-0 mr-4 mt-4"
75
76
onClick = { ( ) => scrollHorizontally ( scrollDirection . Left ) }
76
77
>
77
78
< FaChevronRight className = "b-0 w-6 h-6 rotate-180 dark:text-gray-300 bg-gray-300 dark:bg-dark-900 rounded-full p-1 font-bold" />
78
79
</ button >
79
80
< button
81
+ type = "button"
80
82
className = "absolute right-0 bottom-0 mr-4 mt-4"
81
83
onClick = { ( ) => handleScrollRight ( ) }
82
84
>
Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
2
import { graphql , usePaginationFragment } from 'react-relay'
3
3
import { IssuesFromRecentRepos$key } from '__generated__/IssuesFromRecentRepos.graphql'
4
+ import Button from '../Button'
4
5
import Issue from './Issue'
5
6
6
7
type IssuesFromRecentReposProps = {
@@ -46,13 +47,13 @@ const IssuesFromRecentRepos = ({ user }: IssuesFromRecentReposProps) => {
46
47
( issue ) => issue && < Issue issue = { issue . node } key = { issue . node . id } />
47
48
) }
48
49
{ hasNext ? (
49
- < button
50
+ < Button
50
51
onClick = { ( ) => {
51
52
loadNext ( 3 )
52
53
} }
53
54
>
54
55
Load more
55
- </ button >
56
+ </ Button >
56
57
) : null }
57
58
</ div >
58
59
</ div >
Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
2
import { graphql , usePaginationFragment } from 'react-relay'
3
3
import { RelevantIssues$key } from '__generated__/RelevantIssues.graphql'
4
+ import Button from '../Button'
4
5
import Issue from './Issue'
5
6
6
7
type RelevantIssuesProps = {
@@ -42,13 +43,13 @@ const RelevantIssues = ({ user }: RelevantIssuesProps) => {
42
43
( issue ) => issue && < Issue issue = { issue . node } key = { issue . node . id } />
43
44
) }
44
45
{ hasNext ? (
45
- < button
46
+ < Button
46
47
onClick = { ( ) => {
47
48
loadNext ( 10 )
48
49
} }
49
50
>
50
51
Load more
51
- </ button >
52
+ </ Button >
52
53
) : null }
53
54
</ div >
54
55
</ div >
You can’t perform that action at this time.
0 commit comments