Skip to content

Commit

Permalink
fix styles
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiker committed Aug 17, 2023
1 parent c078318 commit cd140cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions web/components/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import { forwardRef } from "preact/compat";
interface Props {
title: string;
children: ComponentChildren;
onClose?: () => void;
}

export const Modal = forwardRef(
({ title, children }: Props, ref: Ref<HTMLDialogElement>) => {
({ title, children, ...props }: Props, ref: Ref<HTMLDialogElement>) => {
return (
<dialog ref={ref} class="modal">
<dialog ref={ref} class="modal" onClose={props.onClose}>
<form method="dialog" class="modal-box">
<button class="btn btn-sm btn-circle btn-ghost float-right"></button>
<h3 class="font-bold text-lg">{title}</h3>
Expand Down
16 changes: 8 additions & 8 deletions web/islands/TestWebhookDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { ToastProps } from "web/components/Toast.tsx";
export interface TestWebhookProps {
address: string;
abiHash: string;
setToast: (props: ToastProps) => void;
setToast: (props: ToastProps | null) => void;
}
export const TestWebhookDialog = ({ setToast, ...props }: TestWebhookProps) => {
const modalRef = useRef<HTMLDialogElement>(null);
Expand Down Expand Up @@ -37,49 +37,49 @@ export const TestWebhookDialog = ({ setToast, ...props }: TestWebhookProps) => {

return (
<>
<Modal title="Test Webhook" ref={modalRef}>
<Modal title="Test Webhook" ref={modalRef} onClose={() => setToast(null)}>
<form onSubmit={handleSubmit} class="form-control w-full">
<label>
<label class="label">
Transaction Hash
<input
type="text"
name="txHash"
class="input input-bordered w-full max-w-xs"
/>
</label>
<label>
<label class="label">
Block Hash
<input
type="text"
name="blockHash"
class="input input-bordered w-full max-w-xs"
/>
</label>
<label>
<label class="label">
Topic 1
<input
type="text"
name="topic1"
class="input input-bordered w-full max-w-xs"
/>
</label>
<label>
<label class="label">
Topic 2
<input
type="text"
name="topic2"
class="input input-bordered w-full max-w-xs"
/>
</label>
<label>
<label class="label">
Topic 3
<input
type="text"
name="topic3"
class="input input-bordered w-full max-w-xs"
/>
</label>
<label>
<label class="label">
Data
<input
type="text"
Expand Down

0 comments on commit cd140cb

Please sign in to comment.