addons/vscode/webview/AddMoreCwdsHint.tsxblame
View source
b69ab311/**
b69ab312 * Copyright (c) Meta Platforms, Inc. and affiliates.
b69ab313 *
b69ab314 * This source code is licensed under the MIT license found in the
b69ab315 * LICENSE file in the root directory of this source tree.
b69ab316 */
b69ab317
b69ab318import * as stylex from '@stylexjs/stylex';
b69ab319import {Button} from 'isl-components/Button';
b69ab3110import {Tooltip} from 'isl-components/Tooltip';
b69ab3111import {t, T} from 'isl/src/i18n';
b69ab3112import serverApi from '../../isl/src/ClientToServerAPI';
b69ab3113
b69ab3114const styles = stylex.create({
b69ab3115 wideButton: {
b69ab3116 justifyContent: 'center',
b69ab3117 width: '200px',
b69ab3118 },
b69ab3119});
b69ab3120
b69ab3121export default function AddMoreCwdsHint() {
b69ab3122 return (
b69ab3123 <Tooltip
b69ab3124 title={t(
b69ab3125 'ISL can switch between any repositories that are mounted VS Code workspace folders.\n\n' +
b69ab3126 'Click to add another VS Code workspace folder.',
b69ab3127 )}>
b69ab3128 <Button
b69ab3129 xstyle={styles.wideButton}
b69ab3130 onClick={() => {
b69ab3131 serverApi.postMessage({
b69ab3132 type: 'platform/executeVSCodeCommand',
b69ab3133 command: 'workbench.action.addRootFolder',
b69ab3134 args: [],
b69ab3135 });
b69ab3136 }}>
b69ab3137 <T>Add Folder to Workspace</T>
b69ab3138 </Button>
b69ab3139 </Tooltip>
b69ab3140 );
b69ab3141}