ragflow/web/src/components/new-document-link.tsx
balibabu 793e29f23a
fix: fix uploaded file time error #680 (#690)
### What problem does this PR solve?

fix: fix uploaded file time error #680
feat: support preview of word and excel #684 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2024-05-09 11:30:15 +08:00

29 lines
513 B
TypeScript

import React from 'react';
interface IProps extends React.PropsWithChildren {
link: string;
preventDefault?: boolean;
color?: string;
}
const NewDocumentLink = ({
children,
link,
preventDefault = false,
color = 'rgb(15, 79, 170)',
}: IProps) => {
return (
<a
target="_blank"
onClick={!preventDefault ? undefined : (e) => e.preventDefault()}
href={link}
rel="noreferrer"
style={{ color }}
>
{children}
</a>
);
};
export default NewDocumentLink;