mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 15:45:13 +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
22 lines
544 B
TypeScript
22 lines
544 B
TypeScript
import { ContentKitText } from '@gitbook/api';
|
|
|
|
import { ContentKitServerElementProps } from './types';
|
|
import classNames from 'classnames';
|
|
|
|
export function ElementText(
|
|
props: React.PropsWithChildren<ContentKitServerElementProps<ContentKitText>>,
|
|
) {
|
|
const { element, children } = props;
|
|
|
|
return (
|
|
<span
|
|
className={classNames(
|
|
'contentkit-text',
|
|
element.style ? `contentkit-text-${element.style}` : null,
|
|
)}
|
|
>
|
|
{children}
|
|
</span>
|
|
);
|
|
}
|