@@ -9,13 +9,13 @@ import { DEFAULT_GITPOD_ENDPOINT, EVENT_CURRENT_URL_CHANGED } from "~constants";
9
9
import { STORAGE_KEY_ADDRESS , STORAGE_KEY_ALWAYS_OPTIONS , STORAGE_KEY_NEW_TAB } from "~storage" ;
10
10
11
11
import type { SupportedApplication } from "./button-contributions" ;
12
+ import { BitbucketCaret , CaretForProvider , GitHubCaret } from "./CaretForProvider" ;
12
13
13
- export interface GitpodButtonProps {
14
+ type Props = {
14
15
application : SupportedApplication ;
15
16
additionalClassNames ?: string [ ] ;
16
- }
17
-
18
- export const GitpodButton = ( { application, additionalClassNames } : GitpodButtonProps ) => {
17
+ } ;
18
+ export const GitpodButton = ( { application, additionalClassNames } : Props ) => {
19
19
const [ address ] = useStorage < string > ( STORAGE_KEY_ADDRESS , DEFAULT_GITPOD_ENDPOINT ) ;
20
20
const [ openInNewTab ] = useStorage < boolean > ( STORAGE_KEY_NEW_TAB , true ) ;
21
21
const [ disableAutostart ] = useStorage < boolean > ( STORAGE_KEY_ALWAYS_OPTIONS , false ) ;
@@ -83,7 +83,7 @@ export const GitpodButton = ({ application, additionalClassNames }: GitpodButton
83
83
< div
84
84
id = "gitpod-btn-nav"
85
85
title = "Gitpod"
86
- className = { classNames ( "gitpod-button" , application , ...( additionalClassNames || [ ] ) ) }
86
+ className = { classNames ( "gitpod-button" , application , ...( additionalClassNames ?? [ ] ) ) }
87
87
>
88
88
< div className = { classNames ( "button" ) } >
89
89
< a
@@ -106,9 +106,7 @@ export const GitpodButton = ({ application, additionalClassNames }: GitpodButton
106
106
toggleDropdown ( ) ;
107
107
} }
108
108
>
109
- < svg width = "18" viewBox = "0 0 24 24" className = { classNames ( "chevron-icon" ) } >
110
- < path d = "M7 10L12 15L17 10H7Z" > </ path >
111
- </ svg >
109
+ < CaretForProvider provider = { application } />
112
110
</ button >
113
111
) }
114
112
</ div >
0 commit comments