Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(connect): changed document buttons style #609

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 26 additions & 7 deletions src/pages/content.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { Breadcrumbs, FILE } from '@powerhousedao/design-system';
import {
Breadcrumbs,
FILE,
getDocumentIconSrc,
} from '@powerhousedao/design-system';
import { Document, DocumentModel, Operation } from 'document-model/document';
import { useEffect } from 'react';
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -181,24 +185,39 @@ const Content = () => {
<h3 className="mb-3 mt-4 text-xl font-bold text-gray-600">
New document
</h3>
<div className="flex w-full flex-wrap gap-4">
<div className="flex w-full flex-wrap gap-2">
{documentModels?.map(doc => (
<Button
key={doc.documentModel.id}
aria-details={
doc.documentModel
.description
}
className="bg-gray-200 text-slate-800"
className="flex items-center gap-x-1 border border-gray-400 bg-white px-2 text-xs text-slate-800 shadow-none transition-all hover:scale-105 hover:bg-white"
onClick={() =>
createDocument(doc)
}
>
<span className="text-sm">
{getDocumentModelName(
doc.documentModel.name,
<img
alt="file icon"
className="max-w-none"
height={34}
src={getDocumentIconSrc(
doc.documentModel.id,
)}
</span>
width={24}
/>
<div className="flex flex-col items-start">
<span className="text-xs font-semibold text-gray-700">
{getDocumentModelName(
doc.documentModel
.name,
)}
</span>
<span className="text-[10px] text-gray-600">
{doc.documentModel.id}
</span>
</div>
</Button>
))}
</div>
Expand Down
Loading