diff --git a/assets/plus.svg b/assets/plus.svg
new file mode 100644
index 00000000..e4774d87
--- /dev/null
+++ b/assets/plus.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/trash.svg b/assets/trash.svg
new file mode 100644
index 00000000..2f525c8f
--- /dev/null
+++ b/assets/trash.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/components/Button.js b/components/Button.js
index 3fa61800..3900dc3d 100644
--- a/components/Button.js
+++ b/components/Button.js
@@ -3,10 +3,24 @@ import classNames from 'classnames';
import Icon from './Icon';
import styles from './Button.module.css';
-export default function Button({ icon, type = 'button', children, className, onClick = () => {} }) {
+export default function Button({
+ type = 'button',
+ icon,
+ size,
+ children,
+ className,
+ onClick = () => {},
+}) {
return (
-
+ } size="S">
+
Delete
+
+ >
+ ),
+ },
+ ];
+
async function loadData() {
setData(await get(`/api/website`));
}
@@ -25,7 +46,13 @@ export default function Settings() {
return (
- Settings
+
+ Settings
+
+ } size="S" />
+ Add website
+
+
);
diff --git a/components/Table.js b/components/Table.js
index a957ee7a..a910f5d1 100644
--- a/components/Table.js
+++ b/components/Table.js
@@ -1,25 +1,32 @@
import React from 'react';
+import classNames from 'classnames';
import styles from './Table.module.css';
export default function Table({ columns, rows }) {
return (
-
-
-
- {columns.map(({ key, label }) => (
- {label} |
- ))}
-
-
-
- {rows.map((row, rowIndex) => (
-
- {columns.map(({ key }) => (
- {row[key]} |
- ))}
-
+
+
+ {columns.map(({ key, label }) => (
+
+ {label}
+
))}
-
-
+
+
+ {rows.map((row, rowIndex) => (
+
+ {columns.map(({ key, render, className, style }) => (
+
+ {render ? render(row) : row[key]}
+
+ ))}
+
+ ))}
+
+
);
}
diff --git a/components/Table.module.css b/components/Table.module.css
index ce2ba655..75b44feb 100644
--- a/components/Table.module.css
+++ b/components/Table.module.css
@@ -1,7 +1,27 @@
.table {
- width: 100%;
+ display: flex;
+ flex-direction: column;
}
-.table th {
- text-align: left;
+.header {
+ display: flex;
+}
+
+.head {
+ font-size: var(--font-size-small);
+ font-weight: 600;
+ line-height: 40px;
+ flex: 1;
+}
+
+.row {
+ display: flex;
+ border-bottom: 1px solid var(--gray300);
+ padding: 10px 0;
+}
+
+.cell {
+ display: flex;
+ align-items: flex-start;
+ flex: 1;
}
diff --git a/components/WebsiteDetails.js b/components/WebsiteDetails.js
index 1f120057..96ed4c74 100644
--- a/components/WebsiteDetails.js
+++ b/components/WebsiteDetails.js
@@ -8,6 +8,7 @@ import { getDateRange } from 'lib/date';
import { get } from 'lib/web';
import { browserFilter, urlFilter, refFilter, deviceFilter, countryFilter } from 'lib/filters';
import styles from './WebsiteDetails.module.css';
+import PageHeader from './PageHeader';
const pageviewClasses = 'col-md-12 col-lg-6';
const sessionClasses = 'col-12 col-lg-4';
@@ -45,7 +46,7 @@ export default function WebsiteDetails({ websiteId, defaultDateRange = '7day' })
-
{data.name}
+
{data.name}
(
-
-
-
- {name}
-
-
+
- } /> View details
+ {name}
-
+
}
+ onClick={() =>
+ router.push('/website/[...id]', `/website/${website_id}/${name}`, {
+ shallow: true,
+ })
+ }
+ size="S"
+ >
+
View details
+
+
))}
diff --git a/components/WebsiteList.module.css b/components/WebsiteList.module.css
index 2b3f2618..b6c4acca 100644
--- a/components/WebsiteList.module.css
+++ b/components/WebsiteList.module.css
@@ -9,21 +9,6 @@
margin-bottom: 0;
}
-.header {
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-
-.title {
- color: var(--gray900) !important;
-}
-
-.details {
- font-size: 14px;
- font-weight: 600;
-}
-
-.details svg {
- margin-right: 5px;
+.button {
+ font-size: var(--font-size-small);
}