feat: update dialog component to headlessui (#159)

This commit is contained in:
Razboy20
2024-03-13 23:09:43 -05:00
committed by GitHub
parent df7a7c65d6
commit 442be8cbee
8 changed files with 149 additions and 170 deletions

View File

@@ -8,6 +8,34 @@ type Props = {
className?: string;
};
interface LinkItem {
text: string;
url: string;
}
const links: LinkItem[] = [
{
text: "Summer '24 Course Schedule",
url: 'https://utdirect.utexas.edu/apps/registrar/course_schedule/20242/',
},
{
text: "Fall '24 Course Schedule",
url: 'https://utdirect.utexas.edu/apps/registrar/course_schedule/20236/',
},
{
text: 'Registration Info Sheet',
url: 'https://utdirect.utexas.edu/registrar/ris.WBX',
},
{
text: 'Register For Courses',
url: 'https://utdirect.utexas.edu/registration/chooseSemester.WBX',
},
{
text: 'Degree Audit',
url: 'https://utdirect.utexas.edu/apps/degree/audits/',
},
];
/**
* The "Important Links" section of the calendar website
* @returns
@@ -15,52 +43,19 @@ type Props = {
export default function ImportantLinks({ className }: Props): JSX.Element {
return (
<article className={clsx(className, 'flex flex-col gap-2')}>
<Text variant='h3'>Important Links</Text>
<a
href='https://utdirect.utexas.edu/apps/registrar/course_schedule/20242/'
className='flex items-center gap-0.5 text-ut-burntorange'
target='_blank'
rel='noreferrer'
>
<Text variant='p'>Spring Course Schedule</Text>
<OutwardArrowIcon className='h-3 w-3' />
</a>
<a
href='https://utdirect.utexas.edu/apps/registrar/course_schedule/20236/'
className='flex items-center gap-0.5 text-ut-burntorange'
target='_blank'
rel='noreferrer'
>
<Text variant='p'>Summer Course Schedule</Text>
<OutwardArrowIcon className='h-3 w-3' />
</a>
<a
href='https://utdirect.utexas.edu/registrar/ris.WBX'
className='flex items-center gap-0.5 text-ut-burntorange'
target='_blank'
rel='noreferrer'
>
<Text variant='p'>Registration Info Sheet</Text>
<OutwardArrowIcon className='h-3 w-3' />
</a>
<a
href='https://utdirect.utexas.edu/registration/chooseSemester.WBX'
className='flex items-center gap-0.5 text-ut-burntorange'
target='_blank'
rel='noreferrer'
>
<Text variant='p'>Register For Courses</Text>
<OutwardArrowIcon className='h-3 w-3' />
</a>
<a
href='https://utdirect.utexas.edu/apps/degree/audits/'
className='flex items-center gap-0.5 text-ut-burntorange'
target='_blank'
rel='noreferrer'
>
<Text variant='p'>Degree Audit</Text>
<OutwardArrowIcon className='h-3 w-3' />
</a>
<Text variant='h3'>Useful Links</Text>
{links.map((link, index) => (
<a
key={link.text}
href={link.url}
className='flex items-center gap-0.5 text-ut-burntorange'
target='_blank'
rel='noreferrer'
>
<Text variant='p'>{link.text}</Text>
<OutwardArrowIcon className='h-3 w-3' />
</a>
))}
</article>
);
}