sapling/addons/shared/Icon.tsx
Evan Krause f7d5962686 Add simple star rating
Reviewed By: quark-zju

Differential Revision: D43143007

fbshipit-source-id: c38a41d1aea5e22276390685680fefb3f554fa42
2023-02-09 18:37:31 -08:00

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} />
);
}