Skip to content

Commit

Permalink
feat: implement closed lecture
Browse files Browse the repository at this point in the history
  • Loading branch information
gahyuun committed Jun 16, 2024
1 parent e654034 commit 36e16dd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/ui/lecture/lecture-search/lecture-search-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ export default function LectureSearchBar() {
<Select.Item value="lectureCode" placeholder="과목코드" />
</Select>
</div>
<div className="w-[60%] sm:w-[40%] flex justify-between">
<div className="w-[60%] sm:w-[40%] flex justify-between flex-col gap-1">
<TextInput
data-cy="search-lecture-input"
placeholder="검색어를 입력해주세요"
icon={MagnifyingGlassIcon}
onValueChange={handleDebounceKeywordSearch}
data-testid="lecture-search-input"
/>
<div className="text-zinc-400 text-xs text-end">※ 회색으로 표기된 과목은 폐강과목입니다</div>
</div>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion app/ui/lecture/lecture-search/lecture-search-result.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function LectureSearchResult() {
const render = (item: SearchedLectureInfoResponse, index: number) => {
const searchLectureItem = item;
return (
<List.Row data-cy={`lecture-${searchLectureItem.name}`} key={index}>
<List.Row data-cy={`lecture-${searchLectureItem.name}`} key={index} textColor={item.revoked ? 'gray' : 'black'}>
<Grid cols={4}>
{Object.keys(searchLectureItem).map((key, index) => {
if (key === 'id' || key === 'taken' || key === 'revoked') return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function DeleteTakenLectureButton({ lectureId, onDelete }: Delete
>
<Button
label="확인"
className="font-bold"
className="text-primary font-bold bg-white"
data-cy="confirm-button"
data-testid="confirm-button"
onClick={() => {
Expand Down
4 changes: 2 additions & 2 deletions app/ui/view/molecule/list/list-row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { twMerge } from 'tailwind-merge';

interface ListRowProps extends React.HTMLAttributes<HTMLDivElement> {
children: ReactNode;
textColor?: 'red' | 'black';
textColor?: 'gray' | 'black';
}

export function ListRow({ children, textColor = 'black', ...props }: ListRowProps) {
Expand All @@ -12,7 +12,7 @@ export function ListRow({ children, textColor = 'black', ...props }: ListRowProp
{...props}
className={twMerge(
'border-solid border-gray-300 border-b-[1px] last:border-b-0 py-4 font-medium text-sm xl:text-base 2xl:text-lg hover:bg-gray-100 group hover:first:rounded-t-xl hover:last:rounded-b-xl',
textColor === 'red' ? 'text-red-500' : 'text-zinc-700',
textColor === 'gray' ? 'text-zinc-400' : 'text-zinc-700',
)}
>
{children}
Expand Down

0 comments on commit 36e16dd

Please sign in to comment.