1.1 KB42 lines
Blame
1/**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8import * as stylex from '@stylexjs/stylex';
9import {Button} from 'isl-components/Button';
10import {Tooltip} from 'isl-components/Tooltip';
11import {t, T} from 'isl/src/i18n';
12import serverApi from '../../isl/src/ClientToServerAPI';
13
14const styles = stylex.create({
15 wideButton: {
16 justifyContent: 'center',
17 width: '200px',
18 },
19});
20
21export default function AddMoreCwdsHint() {
22 return (
23 <Tooltip
24 title={t(
25 'ISL can switch between any repositories that are mounted VS Code workspace folders.\n\n' +
26 'Click to add another VS Code workspace folder.',
27 )}>
28 <Button
29 xstyle={styles.wideButton}
30 onClick={() => {
31 serverApi.postMessage({
32 type: 'platform/executeVSCodeCommand',
33 command: 'workbench.action.addRootFolder',
34 args: [],
35 });
36 }}>
37 <T>Add Folder to Workspace</T>
38 </Button>
39 </Tooltip>
40 );
41}
42