Skip to content

Commit

Permalink
Improve bookmark editor style (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
int128 authored Aug 22, 2022
1 parent 8192561 commit 89fc076
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
14 changes: 12 additions & 2 deletions src/BookmarkEditor/component.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
top: calc(var(--size-wide-gap) * 2);
left: calc(var(--size-wide-gap) * 2);
right: calc(var(--size-wide-gap) * 2);
max-width: 800px;
margin: auto;
}

.BookmarkEditor__Overlay {
Expand Down Expand Up @@ -39,9 +41,13 @@
.BookmarkEditor input[type='text'] {
padding: var(--size-form-control-padding);
border-radius: var(--size-form-control-border-radius);
border: var(--palette-1) solid 1px;
color: inherit;
background-color: var(--palette-2);
border: none;
}

.BookmarkEditor input[type='text']:focus {
background-color: var(--palette-3);
}

.BookmarkEditor input[type='text'].BookmarkEditor__Url {
Expand All @@ -55,9 +61,9 @@
.BookmarkEditor input[type='submit'] {
padding: var(--size-form-control-padding);
border-radius: var(--size-form-control-border-radius);
border: var(--palette-1) solid 1px;
color: inherit;
background-color: var(--palette-2);
border: none;
}

.BookmarkEditor input[type='button']:enabled:hover,
Expand All @@ -70,6 +76,10 @@
color: var(--palette-1);
}

.BookmarkEditor input[type='button'][value='Remove']:hover {
color: red;
}

.BookmarkEditor__Message {
padding: var(--size-form-control-padding);
color: var(--palette-03);
Expand Down
6 changes: 3 additions & 3 deletions src/BookmarkEditor/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ const FormComponent: FC<FormComponentProps> = ({
placeholder="Shortcut Key (not assigned)"
onChange={(e) => onChange(editingBookmark.changeShortcutKey(shortcutKeyOf(e.target.value)))}
/>
<Link href={`chrome://bookmarks/?id=${editingBookmark.bookmark.folderID}`}>
Open this in Chrome Bookmark Manager
</Link>
<div className="BookmarkEditor__Group">
<input type="submit" value="Update" disabled={!editingBookmark.valid} />
<div className="BookmarkEditor__Message">{errorMessage}</div>
<input type="button" value="Remove" onClick={() => onRemove()} />
</div>
<Link href={`chrome://bookmarks/?id=${editingBookmark.bookmark.folderID}`}>
Open this in Chrome Bookmark Manager
</Link>
</form>
)
}

0 comments on commit 89fc076

Please sign in to comment.