Skip to content

Commit

Permalink
(fix): change button variants
Browse files Browse the repository at this point in the history
  • Loading branch information
senthil-athiban committed Oct 25, 2024
1 parent 404e089 commit ab18bbe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app/admin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const AdminPage = async () => {
</div>
<Link href="/admin/course/add-course">
{' '}
<Button className='bg-gradient-to-b from-blue-400 to-blue-700 hover:bg-blue-900'>
<Button variant={'branding'}>
{' '}
<PlusCircle className="mr-2 h-4 w-4 text-white" />
<p className='text-white'>New course</p>
Expand Down
9 changes: 6 additions & 3 deletions src/components/admin-dashboard/ClassAssignmentCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,26 @@ const ClassAssignmentCard: React.FC<ClassAssignmentCardProps> = ({ data, type })
</div>
<div className='flex flex-col gap-y-4'>
<Button
className="mt-2 w-full rounded-md px-4 py-2 transition-colors duration-200 bg-gradient-to-b from-blue-400 to-blue-700 dark:text-white"
variant={'branding'}
className="mt-2"
onClick={() => setIsModalOpen(true)}
>
View Details
</Button>
<div>
{type === 'assignment' && (
<Button
className="w-full rounded-md px-4 py-2 transition-colors duration-200 bg-gradient-to-b from-blue-400 to-blue-700 dark:text-white"
variant={'branding'}
className="w-full"
onClick={() => router.push(`/admin/assignment/${data.id}`)}
>
View Submissions
</Button>
)}
{type === 'class' && 'meetingLink' in data && (
<Button
className="w-full rounded-md px-4 py-2 transition-colors duration-200 bg-gradient-to-b from-blue-400 to-blue-700 dark:text-white"
variant={'branding'}
className="w-full"
onClick={() =>
window.open(`https://${data.meetingLink}`, '_blank')
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/admin-dashboard/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const Header: React.FC<HeaderProps> = ({ title }) => {
{title}
</h1>
<Button
className="mt-2 rounded-md px-4 py-2 bg-gradient-to-b from-blue-400 to-blue-700 dark:text-white"
variant={'branding'}
className="mt-2"
onClick={() => setIsModalOpen(true)}
>
+ Add new {title.toLocaleLowerCase()}
Expand Down

0 comments on commit ab18bbe

Please sign in to comment.