DDBS UI
modals

Info Modal

A simple information dialog driven by content props: about us, delivery policy, size notes. One component for the many near-identical About modals.

npx shadcn@latest add https://ui.develop-better-solutions.com/r/info-modal.json
Fullscreen

Usage

info-modal-example.tsx
"use client";

import { useState } from "react";
import { InfoModal } from "@dbs/ui";

export default function InfoModalExample() {
  const [open, setOpen] = useState(false);
  return (
    <>
      <button type="button" onClick={() => setOpen(true)} className="h-11 rounded-full bg-ink px-6 text-sm font-medium text-canvas">About the store</button>
      <InfoModal
        open={open}
        onOpenChange={setOpen}
        eyebrow="About"
        title="A small studio, made to order"
        content={["We make furniture and lighting in small batches and ship it flat-packed across the country.", "Every piece is finished by hand and checked twice before it leaves the workshop."]}
        facts={[{ label: "Founded", value: "2019" }, { label: "Workshop", value: "Casablanca" }, { label: "Delivery", value: "3 to 5 days" }, { label: "Returns", value: "30 days" }]}
      />
    </>
  );
}