mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-17 16:15:22 +00:00
13 lines
400 B
TypeScript
13 lines
400 B
TypeScript
import type { ContentKitIcon } from '@gitbook/api';
|
|
import type { ContentKitServerContext } from './types';
|
|
|
|
export function ElementIcon(props: { icon: ContentKitIcon; context: ContentKitServerContext }) {
|
|
const { icon, context } = props;
|
|
const C = context.icons[icon];
|
|
if (!C) {
|
|
return <span className="contentkit-icon" />;
|
|
}
|
|
|
|
return <C className="contentkit-icon" />;
|
|
}
|