Skip to content

Commit 4c06fd9

Browse files
feat: implement add multiple movies
1 parent 80e5cd4 commit 4c06fd9

14 files changed

Lines changed: 1951 additions & 180 deletions

File tree

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
/**
2+
* Action Buttons Styles
3+
*
4+
* CSS Module for the action buttons component.
5+
* Provides consistent styling with the rest of the application.
6+
*/
7+
8+
.actionButtons {
9+
display: flex;
10+
gap: 1rem;
11+
margin-bottom: 2rem;
12+
justify-content: flex-start;
13+
}
14+
15+
.button {
16+
padding: 0.75rem 1.5rem;
17+
border: none;
18+
border-radius: 8px;
19+
font-size: 1rem;
20+
font-weight: 500;
21+
cursor: pointer;
22+
transition: all 0.2s ease;
23+
text-decoration: none;
24+
display: inline-flex;
25+
align-items: center;
26+
justify-content: center;
27+
min-width: 120px;
28+
}
29+
30+
.button:disabled {
31+
opacity: 0.6;
32+
cursor: not-allowed;
33+
transform: none;
34+
}
35+
36+
.editButton {
37+
background: #0070f3;
38+
color: white;
39+
border: 1px solid #0070f3;
40+
}
41+
42+
.editButton:hover:not(:disabled) {
43+
background: #0051cc;
44+
border-color: #0051cc;
45+
transform: translateY(-1px);
46+
box-shadow: 0 4px 8px rgba(0, 112, 243, 0.3);
47+
}
48+
49+
.deleteButton {
50+
background: #dc2626;
51+
color: white;
52+
border: 1px solid #dc2626;
53+
}
54+
55+
.deleteButton:hover:not(:disabled) {
56+
background: #b91c1c;
57+
border-color: #b91c1c;
58+
transform: translateY(-1px);
59+
box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
60+
}
61+
62+
/* Responsive Design */
63+
@media (max-width: 768px) {
64+
.actionButtons {
65+
flex-direction: column;
66+
gap: 0.75rem;
67+
}
68+
69+
.button {
70+
width: 100%;
71+
padding: 0.875rem 1rem;
72+
}
73+
}
74+
75+
@media (max-width: 480px) {
76+
.actionButtons {
77+
gap: 0.5rem;
78+
}
79+
80+
.button {
81+
padding: 0.75rem 1rem;
82+
font-size: 0.9rem;
83+
}
84+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
'use client';
2+
3+
/**
4+
* Action Buttons Component
5+
*
6+
* Provides Edit and Delete actions for movie details page
7+
*/
8+
9+
import styles from './ActionButtons.module.css';
10+
11+
interface ActionButtonsProps {
12+
onEdit: () => void;
13+
onDelete: () => void;
14+
isLoading?: boolean;
15+
disabled?: boolean;
16+
}
17+
18+
export default function ActionButtons({
19+
onEdit,
20+
onDelete,
21+
isLoading = false,
22+
disabled = false
23+
}: ActionButtonsProps) {
24+
return (
25+
<div className={styles.actionButtons}>
26+
<button
27+
onClick={onEdit}
28+
disabled={disabled || isLoading}
29+
className={`${styles.button} ${styles.editButton}`}
30+
type="button"
31+
>
32+
{isLoading ? 'Loading...' : 'Edit Movie'}
33+
</button>
34+
35+
<button
36+
onClick={onDelete}
37+
disabled={disabled || isLoading}
38+
className={`${styles.button} ${styles.deleteButton}`}
39+
type="button"
40+
>
41+
{isLoading ? 'Loading...' : 'Delete Movie'}
42+
</button>
43+
</div>
44+
);
45+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './ActionButtons';

0 commit comments

Comments
 (0)