909 B42 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';
9
10const styles = stylex.create({
11 button: {
12 display: 'flex',
13 alignItems: 'center',
14 fontSize: '12px',
15 color: 'var(--vscode-descriptionForeground)',
16 whiteSpace: 'nowrap',
17 cursor: 'pointer',
18 gap: '5px',
19 boxSizing: 'border-box',
20 borderBottom: {
21 default: '1px solid transparent',
22 ':hover': '1px solid var(--vscode-editor-foreground)',
23 },
24 },
25});
26
27export default function ActionLink({
28 onClick,
29 children,
30 title,
31}: {
32 onClick: () => void;
33 title?: string;
34 children: React.ReactNode;
35}) {
36 return (
37 <div {...stylex.props(styles.button)} onClick={() => onClick()} title={title}>
38 {children}
39 </div>
40 );
41}
42