2025-04-01 10:38:02 +09:00

17 lines
359 B
TypeScript

import { cx } from '@emotion/css';
import * as React from 'react';
import { isUrl } from './utils';
export const renderValue = (value: string): string | React.ReactNode => {
if (isUrl(value)) {
return (
<a href={value} target={'_blank'} className={cx('external-link')} rel="noreferrer">
{value}
</a>
);
}
return value;
};