Dariky commited on
Commit
a56d13e
·
verified ·
1 Parent(s): 6ba1884

Upload components/PrintableContent.jsx with huggingface_hub

Browse files
Files changed (1) hide show
  1. components/PrintableContent.jsx +69 -0
components/PrintableContent.jsx ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const PrintableContent = () => (
2
+ <div className="rounded-lg border border-gray-200 bg-white p-6 shadow-sm">
3
+ <div className="mb-8 text-center">
4
+ <h2 className="text-3xl font-bold text-gray-900">Printable Document</h2>
5
+ <p className="mt-2 text-gray-600">This content is designed to be printed</p>
6
+ </div>
7
+
8
+ <div className="mb-8">
9
+ <h3 className="text-xl font-semibold text-gray-800">Document Details</h3>
10
+ <div className="mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2">
11
+ <div className="rounded-lg bg-gray-50 p-4">
12
+ <p className="text-sm font-medium text-gray-500">Title</p>
13
+ <p className="text-lg font-semibold text-gray-900">React Print Modal Demo</p>
14
+ </div>
15
+ <div className="rounded-lg bg-gray-50 p-4">
16
+ <p className="text-sm font-medium text-gray-500">Date</p>
17
+ <p className="text-lg font-semibold text-gray-900">October 25, 2023</p>
18
+ </div>
19
+ <div className="rounded-lg bg-gray-50 p-4">
20
+ <p className="text-sm font-medium text-gray-500">Author</p>
21
+ <p className="text-lg font-semibold text-gray-900">React Developer</p>
22
+ </div>
23
+ <div className="rounded-lg bg-gray-50 p-4">
24
+ <p className="text-sm font-medium text-gray-500">Status</p>
25
+ <p className="text-lg font-semibold text-secondary">Completed</p>
26
+ </div>
27
+ </div>
28
+ </div>
29
+
30
+ <div className="mb-8">
31
+ <h3 className="text-xl font-semibold text-gray-800">Main Content</h3>
32
+ <div className="mt-4 space-y-4 text-gray-700">
33
+ <p>
34
+ This is a sample document designed to demonstrate how to print modal content in React.
35
+ The content inside this modal can be easily printed using the print button, which opens
36
+ a new window with just the content you want to print.
37
+ </p>
38
+ <p>
39
+ The application uses Tailwind CSS for styling and includes a custom print modal component
40
+ that provides a clean interface for printing specific content. This approach ensures that
41
+ only the relevant content is printed without any UI elements or navigation.
42
+ </p>
43
+ <div className="rounded-lg bg-blue-50 p-4">
44
+ <h4 className="font-semibold text-blue-900">Key Features</h4>
45
+ <ul className="mt-2 list-disc space-y-1 pl-5 text-blue-800">
46
+ <li>Clean print preview modal</li>
47
+ <li>Custom print functionality</li>
48
+ <li>Tailwind CSS styling</li>
49
+ <li>Responsive design</li>
50
+ </ul>
51
+ </div>
52
+ </div>
53
+ </div>
54
+
55
+ <div className="border-t border-gray-200 pt-6">
56
+ <div className="flex flex-col items-center justify-center space-y-4 sm:flex-row sm:justify-between">
57
+ <div className="text-center sm:text-left">
58
+ <p className="text-sm text-gray-500">For more information</p>
59
+ <p className="text-lg font-semibold text-gray-900">Visit our website</p>
60
+ </div>
61
+ <div className="flex space-x-2">
62
+ <div className="h-12 w-12 rounded bg-gray-200"></div>
63
+ <div className="h-12 w-12 rounded bg-gray-200"></div>
64
+ <div className="h-12 w-12 rounded bg-gray-200"></div>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ );