dark mode support, close #14

This commit is contained in:
spencerwooo
2021-08-23 16:14:08 +01:00
parent 96e9dbb2b2
commit ae8ada58ca
19 changed files with 1526 additions and 177 deletions
+3 -3
View File
@@ -12,14 +12,14 @@ const TextPreview: FunctionComponent<{ file: any }> = ({ file }) => {
const { data, error } = useSWR(file['@microsoft.graph.downloadUrl'], fetcher)
if (error) {
return (
<div className="shadow bg-white rounded p-3">
<div className="shadow bg-white dark:bg-gray-900 rounded p-3">
<FourOhFour errorMsg={error.message} />
</div>
)
}
if (!data) {
return (
<div className="shadow bg-white rounded p-3">
<div className="shadow bg-white dark:bg-gray-900 rounded p-3">
<Loading loadingText="Loading file content..." />
</div>
)
@@ -27,7 +27,7 @@ const TextPreview: FunctionComponent<{ file: any }> = ({ file }) => {
return (
<>
<div className="shadow bg-white rounded p-3">
<div className="shadow bg-white dark:bg-gray-900 rounded p-3">
<pre className="p-0 md:p-3 overflow-scroll">{data}</pre>
</div>
<div className="mt-4">