Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/components/content/BookmarkButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* Storage is dynamically imported inside `onMount` to avoid
* runtime errors in non-extension environments.
*
* @param props - Lecture metadata used for bookmarking

Check warning on line 21 in src/components/content/BookmarkButton.tsx

View workflow job for this annotation

GitHub Actions / lint

Missing JSDoc @PARAM "props" type
* @returns A bookmark toggle button

Check warning on line 22 in src/components/content/BookmarkButton.tsx

View workflow job for this annotation

GitHub Actions / lint

Missing JSDoc @returns type
*/
const BookmarkButton = (props: BookmarkButtonProps): JSX.Element => {
const [isBookmarked, setIsBookmarked] = createSignal(false);
Expand Down Expand Up @@ -55,16 +55,16 @@
<div class='relative group inline-flex'>
<button
onClick={handleClick}
class='flex items-center justify-center w-9 h-9 rounded-md transition-colors duration-200'
class='flex items-center justify-center w-7 h-7 rounded-md transition-colors duration-200'
classList={{
'bg-ut-burntorange': isBookmarked(),
'bg-gray-200 hover:bg-gray-300': !isBookmarked(),
}}
>
<Bookmark class='w-6 h-6' color={isBookmarked() ? 'white' : 'currentColor'} />
<Bookmark class='w-4 h-4' color={isBookmarked() ? 'white' : 'currentColor'} />
</button>
<span class='pointer-events-none absolute bottom-full left-1/2 -translate-x-1/2 mb-1 px-2 py-1 text-lg text-white bg-gray-800 rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity duration-100'>
{isBookmarked() ? 'Remove bookmark' : 'Bookmark this lecture'}
<span class='pointer-events-none absolute bottom-full left-1/2 -translate-x-1/2 mb-1 px-1.5 py-0.5 text-xs text-white bg-gray-800 rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity duration-100'>
{isBookmarked() ? 'Remove bookmark' : 'Bookmark lecture'}
</span>
</div>
</Show>
Expand Down
10 changes: 5 additions & 5 deletions src/components/content/EditTitleButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Renders an inline edit button for a lecture title.
* Clicking switches to an input field. Enter saves, Escape cancels.
*
* @param props - The episode metadata and title element to edit

Check warning on line 18 in src/components/content/EditTitleButton.tsx

View workflow job for this annotation

GitHub Actions / lint

Missing JSDoc @PARAM "props" type
* @returns An edit/save button
*/
const EditTitleButton = (props: EditTitleButtonProps): JSX.Element => {
Expand Down Expand Up @@ -84,15 +84,15 @@
<div class='relative group inline-flex'>
<button
onClick={() => (isEditing() ? commitSave() : startEditing())}
class='flex items-center justify-center w-9 h-9 rounded-md transition-colors duration-200 bg-gray-200 hover:bg-gray-300'
class='flex items-center justify-center w-7 h-7 rounded-md transition-colors duration-200 bg-gray-200 hover:bg-gray-300'
classList={{ 'bg-ut-burntorange hover:bg-ut-burntorange': isEditing() }}
>
<Show when={isEditing()} fallback={<Pencil class='w-5 h-5' />}>
<Check class='w-5 h-5' color='white' />
<Show when={isEditing()} fallback={<Pencil class='w-4 h-4' />}>
<Check class='w-4 h-4' color='white' />
</Show>
</button>
<span class='pointer-events-none absolute bottom-full left-1/2 -translate-x-1/2 mb-1 px-2 py-1 text-lg text-white bg-gray-800 rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity duration-100'>
{isEditing() ? 'Save (Enter) · Cancel (Esc)' : 'Edit lecture title'}
<span class='pointer-events-none absolute bottom-full left-1/2 -translate-x-1/2 mb-1 px-1.5 py-0.5 text-xs text-white bg-gray-800 rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity duration-100'>
{isEditing() ? 'Save (Enter) · Cancel (Esc)' : 'Edit title'}
</span>
</div>
);
Expand Down
Loading
Loading