mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 14:28:17 +03:00
f7d5962686
Reviewed By: quark-zju Differential Revision: D43143007 fbshipit-source-id: c38a41d1aea5e22276390685680fefb3f554fa42
25 lines
582 B
TypeScript
25 lines
582 B
TypeScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
import '@vscode/codicons/dist/codicon.css';
|
|
import './Icon.css';
|
|
|
|
export function Icon({
|
|
icon,
|
|
size,
|
|
slot,
|
|
...other
|
|
}: {
|
|
slot?: 'start';
|
|
icon: string;
|
|
size?: 'S' | 'M' | 'L';
|
|
} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) {
|
|
return (
|
|
<div slot={slot} className={`codicon codicon-${icon} icon-size-${size ?? 'S'}`} {...other} />
|
|
);
|
|
}
|