Skip to content

Commit bf4c190

Browse files
authored
feat: Hello "Dark Mode" (#456)
* feat: Hello "Dark Mode" * chore: Update tests
1 parent e3be1e3 commit bf4c190

23 files changed

+74
-62
lines changed

src/js/components/__snapshots__/account-notifications.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`components/account-notifications.tsx should render itself (github.com with notifications) 1`] = `
44
<div
5-
className="flex flex-1 items-center justify-between py-2 px-4 bg-gray-300 text-sm"
5+
className="flex flex-1 items-center justify-between py-2 px-4 bg-gray-300 dark:bg-gray-darkest dark:text-white text-sm"
66
>
77
github.com
88
<svg
@@ -31,7 +31,7 @@ exports[`components/account-notifications.tsx should render itself (github.com w
3131

3232
exports[`components/account-notifications.tsx should render itself (github.com without notifications) 1`] = `
3333
<div
34-
className="flex flex-1 items-center justify-between py-2 px-4 bg-gray-300 text-sm"
34+
className="flex flex-1 items-center justify-between py-2 px-4 bg-gray-300 dark:bg-gray-darkest dark:text-white text-sm"
3535
>
3636
github.com
3737
<svg

src/js/components/__snapshots__/all-read.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`components/all-read.tsx should render itself & its children 1`] = `
44
<div
5-
className="flex flex-1 flex-col justify-center items-center p-4"
5+
className="flex flex-1 flex-col justify-center items-center p-4 bg-white dark:bg-gray-dark text-black dark:text-white"
66
>
77
<h1
88
className="text-5xl mb-5"

src/js/components/__snapshots__/notification.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`components/notification.js should render itself & its children 1`] = `
44
<div
5-
className="flex space-x-2 p-2 bg-white hover:bg-gray-100 border-b border-gray-100"
5+
className="flex space-x-2 p-2 bg-white dark:bg-gray-dark dark:text-white hover:bg-gray-100 dark:hover:bg-gray-darker border-b border-gray-100 dark:border-gray-darker"
66
>
77
<div
88
className="flex justify-center items-center w-8"

src/js/components/__snapshots__/oops.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`components/oops.tsx should render itself & its children 1`] = `
44
<div
5-
className="flex flex-1 flex-col justify-center items-center p-4"
5+
className="flex flex-1 flex-col justify-center items-center p-4 bg-white dark:bg-gray-dark text-black dark:text-white"
66
>
77
<h1
88
className="text-5xl mb-5"

src/js/components/__snapshots__/repository.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
exports[`components/repository.tsx should render itself & its children 1`] = `
44
Array [
55
<div
6-
className="flex flex-1 p-2 bg-gray-100"
6+
className="flex flex-1 p-2 bg-gray-100 dark:bg-gray-darker dark:text-white"
77
>
88
<div
9-
className="flex flex-1 p-0.5 items-center mt-0 text-base font-medium overflow-hidden overflow-ellipsis whitespace-nowrap"
9+
className="flex flex-1 p-0.5 items-center mt-0 text-sm font-medium overflow-hidden overflow-ellipsis whitespace-nowrap"
1010
>
1111
<img
1212
className="rounded w-5 h-5 ml-1 mr-3"

src/js/components/__snapshots__/sidebar.test.tsx.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`components/Sidebar.tsx should render itself & its children (logged in) 1`] = `
44
<div
5-
className="flex flex-col fixed left-14 w-14 -ml-14 h-full bg-primary overflow-y-auto "
5+
className="flex flex-col fixed left-14 w-14 -ml-14 h-full bg-gray-sidebar overflow-y-auto "
66
>
77
<div
88
className="flex flex-col flex-1 items-center py-4"
@@ -81,7 +81,7 @@ exports[`components/Sidebar.tsx should render itself & its children (logged in)
8181
<div
8282
className="py-4 px-3"
8383
>
84-
<div
84+
<button
8585
aria-label="Refresh Notifications"
8686
className="flex justify-evenly items-center bg-transparent border-0 w-full text-sm text-white my-1 py-2 cursor-pointer hover:text-gray-500 focus:outline-none"
8787
onClick={[Function]}
@@ -107,8 +107,8 @@ exports[`components/Sidebar.tsx should render itself & its children (logged in)
107107
viewBox="0 0 16 16"
108108
width={16}
109109
/>
110-
</div>
111-
<div
110+
</button>
111+
<button
112112
aria-label="Settings"
113113
className="flex justify-evenly items-center bg-transparent border-0 w-full text-sm text-white my-1 py-2 cursor-pointer hover:text-gray-500 focus:outline-none"
114114
onClick={[Function]}
@@ -134,7 +134,7 @@ exports[`components/Sidebar.tsx should render itself & its children (logged in)
134134
viewBox="0 0 16 16"
135135
width={16}
136136
/>
137-
</div>
137+
</button>
138138
<div
139139
aria-label="View project on GitHub"
140140
className="flex justify-evenly items-center bg-transparent border-0 w-full text-sm text-white my-1 py-2 cursor-pointer hover:text-gray-500 focus:outline-none"
@@ -168,7 +168,7 @@ exports[`components/Sidebar.tsx should render itself & its children (logged in)
168168

169169
exports[`components/Sidebar.tsx should render itself & its children (logged out) 1`] = `
170170
<div
171-
className="flex flex-col fixed left-14 w-14 -ml-14 h-full bg-primary overflow-y-auto "
171+
className="flex flex-col fixed left-14 w-14 -ml-14 h-full bg-gray-sidebar overflow-y-auto "
172172
>
173173
<div
174174
className="flex flex-col flex-1 items-center py-4"

src/js/components/account-notifications.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const AccountNotifications = (props: IProps) => {
2424
return (
2525
<>
2626
{showAccountHostname && (
27-
<div className="flex flex-1 items-center justify-between py-2 px-4 bg-gray-300 text-sm">
27+
<div className="flex flex-1 items-center justify-between py-2 px-4 bg-gray-300 dark:bg-gray-darkest dark:text-white text-sm">
2828
{hostname}
2929

3030
<Chevron size={20} />

src/js/components/all-read.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const AllRead = () => {
2222
);
2323

2424
return (
25-
<div className="flex flex-1 flex-col justify-center items-center p-4">
25+
<div className="flex flex-1 flex-col justify-center items-center p-4 bg-white dark:bg-gray-dark text-black dark:text-white">
2626
<h1 className="text-5xl mb-5">{emojify(emoji, { output: 'unicode' })}</h1>
2727

2828
<h2 className="font-semibold text-xl mb-2 text-semibold">

src/js/components/fields/input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class FieldInput extends React.PureComponent<IProps> {
3232

3333
<input
3434
type="text"
35-
className="appearance-none block w-full bg-gray-100 text-grey-darker border border-red rounded py-2 px-4 mb-2 focus:bg-gray-200"
35+
className="appearance-none block w-full bg-gray-100 border border-red rounded py-2 px-4 mb-2 focus:bg-gray-200 focus:outline-none"
3636
id={input.name}
3737
placeholder={placeholder}
3838
{...input}

src/js/components/notification.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const NotificationItem: React.FC<IProps> = (props) => {
5757
});
5858

5959
return (
60-
<div className="flex space-x-2 p-2 bg-white hover:bg-gray-100 border-b border-gray-100">
60+
<div className="flex space-x-2 p-2 bg-white dark:bg-gray-dark dark:text-white hover:bg-gray-100 dark:hover:bg-gray-darker border-b border-gray-100 dark:border-gray-darker">
6161
<div className="flex justify-center items-center w-8">
6262
<NotificationIcon size={18} aria-label={notification.subject.type} />
6363
</div>

0 commit comments

Comments
 (0)