mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 18:13:29 +00:00
70c6c9df42
* Start * Try webframe * Lint and format * Move to package * Continue * Implement card and cleanup contexts * Start code blocks * Start rendering image * Continue with card * Start stack * Start text * Start modal * Format * Continue * Fix TS errors * Cleanup * Make markdown work with server components * Format * Add visual test * Lint and format * Fix lifecycle * Implement textinput * Divider * Remove console logs * Remove listSpaceIntegrationsBlocks
13 lines
390 B
TypeScript
13 lines
390 B
TypeScript
import { ContentKitIcon } from '@gitbook/api';
|
|
import { 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" />;
|
|
}
|