diff --git a/components/ConnectedUserMenu.tsx b/components/ConnectedUserMenu.tsx
index afdc6f2..1387ec6 100644
--- a/components/ConnectedUserMenu.tsx
+++ b/components/ConnectedUserMenu.tsx
@@ -1,5 +1,6 @@
import Image from 'next/image'
import Link from 'next/link'
+import { Button } from './ui'
import type { NostrProfile } from '@/types/nostr'
import { NotificationCenter } from './NotificationCenter'
@@ -36,13 +37,14 @@ export function ConnectedUserMenu({
)}
{displayName}
-
Disconnect
-
+
)
}
diff --git a/components/ImageUploadField.tsx b/components/ImageUploadField.tsx
index f681fb8..b3ecd82 100644
--- a/components/ImageUploadField.tsx
+++ b/components/ImageUploadField.tsx
@@ -1,5 +1,6 @@
import { useState } from 'react'
import { uploadNip95Media } from '@/lib/nip95'
+import { Button } from './ui'
import { t } from '@/lib/i18n'
import Image from 'next/image'
import { UnlockAccountModal } from './UnlockAccountModal'
@@ -37,13 +38,14 @@ function RemoveButton({ value, onChange }: { value: string | undefined; onChange
return null
}
return (
- onChange('')}
- className="px-4 py-2 bg-red-500/20 hover:bg-red-500/30 text-red-400 rounded-lg text-sm font-medium transition-all border border-red-500/50"
>
{t('presentation.field.picture.remove')}
-
+
)
}
@@ -62,11 +64,10 @@ function ImageUploadControls({
}): React.ReactElement {
return (
diff --git a/components/UserArticlesList.tsx b/components/UserArticlesList.tsx
index 0328901..c1024d7 100644
--- a/components/UserArticlesList.tsx
+++ b/components/UserArticlesList.tsx
@@ -1,4 +1,5 @@
import { ArticleCard } from './ArticleCard'
+import { Button } from './ui'
import type { Article } from '@/types/nostr'
import { memo } from 'react'
import Link from 'next/link'
@@ -56,19 +57,21 @@ function ArticleActions({
}): React.ReactElement {
return (
- onEdit(article)}
- className="px-3 py-1 text-sm rounded bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50"
disabled={editingArticleId !== null && editingArticleId !== article.id}
>
{t('common.edit')}
-
-
+ (pendingDeleteId === article.id ? onDelete(article) : requestDelete(article.id))}
- className="px-3 py-1 text-sm rounded bg-red-600 text-white hover:bg-red-700"
>
{pendingDeleteId === article.id ? t('common.confirmDelete') : t('common.delete')}
-
+
)
}
diff --git a/components/authorPage/SeriesList.tsx b/components/authorPage/SeriesList.tsx
index edda1ba..b6487c5 100644
--- a/components/authorPage/SeriesList.tsx
+++ b/components/authorPage/SeriesList.tsx
@@ -2,6 +2,7 @@ import Link from 'next/link'
import { useState } from 'react'
import { CreateSeriesModal } from '@/components/CreateSeriesModal'
import { SeriesCard } from '@/components/SeriesCard'
+import { Button } from '@/components/ui'
import { useNostrAuth } from '@/hooks/useNostrAuth'
import { t } from '@/lib/i18n'
import type { Series } from '@/types/nostr'
@@ -30,13 +31,13 @@ function SeriesListHeader(params: { isAuthor: boolean; onCreate: () => void }):
{t('series.title')}
{params.isAuthor && (
-
{t('series.create.button')}
-
+
)}
)
diff --git a/components/authorPage/SponsoringSummary.tsx b/components/authorPage/SponsoringSummary.tsx
index 07dd2d3..fc89582 100644
--- a/components/authorPage/SponsoringSummary.tsx
+++ b/components/authorPage/SponsoringSummary.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react'
+import { Button } from '@/components/ui'
import { SponsoringForm } from '@/components/SponsoringForm'
import { t } from '@/lib/i18n'
import type { AuthorPresentationArticle } from '@/types/nostr'
@@ -27,12 +28,12 @@ function SponsoringSummaryHeader(params: { showSponsorButton: boolean; onSponsor
{t('author.sponsoring')}
{params.showSponsorButton && (
-
{t('sponsoring.form.submit')}
-
+
)}
)
diff --git a/components/authorPresentationEditor/AuthorPresentationEditor.tsx b/components/authorPresentationEditor/AuthorPresentationEditor.tsx
index 6872240..26c6678 100644
--- a/components/authorPresentationEditor/AuthorPresentationEditor.tsx
+++ b/components/authorPresentationEditor/AuthorPresentationEditor.tsx
@@ -1,6 +1,7 @@
import { useEffect } from 'react'
import { useNostrAuth } from '@/hooks/useNostrAuth'
import { useAuthorPresentation } from '@/hooks/useAuthorPresentation'
+import { Button } from '../ui'
import { t } from '@/lib/i18n'
import { NoAccountView } from './NoAccountView'
import { PresentationForm } from './PresentationForm'
@@ -14,11 +15,10 @@ function SuccessNotice(params: { pubkey: string | null }): React.ReactElement {
{t('presentation.successMessage')}
{params.pubkey ? (
) : null}
diff --git a/components/authorPresentationEditor/PresentationForm.tsx b/components/authorPresentationEditor/PresentationForm.tsx
index 33d24a0..1c8a386 100644
--- a/components/authorPresentationEditor/PresentationForm.tsx
+++ b/components/authorPresentationEditor/PresentationForm.tsx
@@ -1,5 +1,6 @@
import type { FormEvent } from 'react'
import { PresentationFormHeader } from '../PresentationFormHeader'
+import { Button, ErrorState } from '../ui'
import { t } from '@/lib/i18n'
import { PresentationFields } from './fields'
import type { AuthorPresentationDraft } from './types'
@@ -29,13 +30,15 @@ export function PresentationForm(props: PresentationFormProps): React.ReactEleme
-
{getSubmitLabel({ loading: props.loading, deleting: props.deleting, hasExistingPresentation: props.hasExistingPresentation })}
-
+
{props.hasExistingPresentation ?
: null}
@@ -47,23 +50,21 @@ function ValidationError(params: { message: string | null }): React.ReactElement
if (!params.message) {
return null
}
- return (
-
- )
+ return
}
function DeleteButton(params: { onDelete: () => void; deleting: boolean }): React.ReactElement {
return (
-
{params.deleting ? t('presentation.delete.deleting') : t('presentation.delete.button')}
-
+
)
}
diff --git a/components/createSeriesModal/CreateSeriesModalView.tsx b/components/createSeriesModal/CreateSeriesModalView.tsx
index ef39ec9..4011bdc 100644
--- a/components/createSeriesModal/CreateSeriesModalView.tsx
+++ b/components/createSeriesModal/CreateSeriesModalView.tsx
@@ -1,5 +1,6 @@
import React from 'react'
import { ImageUploadField } from '../ImageUploadField'
+import { Button, Input, Textarea } from '../ui'
import { t } from '@/lib/i18n'
import type { SeriesDraft } from './createSeriesModalTypes'
import type { CreateSeriesModalController } from './useCreateSeriesModalController'
@@ -145,21 +146,22 @@ function SeriesError({ error }: { error: string | null }): React.ReactElement |
function SeriesActions(params: { loading: boolean; canPublish: boolean; onClose: () => void }): React.ReactElement {
return (
-
{t('common.cancel')}
-
-
+
{params.loading ? t('common.loading') : t('series.create.submit')}
-
+
)
}
@@ -173,20 +175,15 @@ function TextField(params: {
onChange: (value: string) => void
}): React.ReactElement {
return (
-
-
- {params.label}
-
- params.onChange(e.target.value)}
- className="w-full px-3 py-2 bg-cyber-darker border border-cyber-accent/30 rounded text-cyber-light focus:border-neon-cyan focus:outline-none"
- required={params.required}
- disabled={params.disabled}
- />
-
+
params.onChange(e.target.value)}
+ required={params.required}
+ disabled={params.disabled}
+ />
)
}
@@ -201,20 +198,15 @@ function TextAreaField(params: {
onChange: (value: string) => void
}): React.ReactElement {
return (
-
+