diff --git a/frontend/src/components/Block.module.css b/frontend/src/components/Block.module.css new file mode 100644 index 00000000..d3daa431 --- /dev/null +++ b/frontend/src/components/Block.module.css @@ -0,0 +1,21 @@ +/* Copyright 2023 The Matrix.org Foundation C.I.C. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +.block { + background-color: var(--cpd-color-bg-subtle-secondary); + color: var(--cpd-color-text-primary); + padding: var(--cpd-space-4x); + border-radius: var(--cpd-space-2x); +} \ No newline at end of file diff --git a/frontend/src/components/Block.tsx b/frontend/src/components/Block.tsx index 62f80bd1..8292ad69 100644 --- a/frontend/src/components/Block.tsx +++ b/frontend/src/components/Block.tsx @@ -12,15 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +import styles from "./Block.module.css"; + type Props = { - children: React.ReactNode; highlight?: boolean; - className?: string; }; -const Block: React.FC = ({ children, highlight, className }) => { +const Block: React.FC> = ({ + children, + highlight, +}) => { return ( -
+
{children}
); diff --git a/frontend/src/components/BlockList.module.css b/frontend/src/components/BlockList.module.css new file mode 100644 index 00000000..354eb3f8 --- /dev/null +++ b/frontend/src/components/BlockList.module.css @@ -0,0 +1,21 @@ +/* Copyright 2023 The Matrix.org Foundation C.I.C. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +.block-list { + display: grid; + grid-template-columns: 1fr; + gap: var(--cpd-space-4x); + align-content: flex-start; +} \ No newline at end of file diff --git a/frontend/src/components/BlockList.tsx b/frontend/src/components/BlockList.tsx index 33098a2f..d458e1c3 100644 --- a/frontend/src/components/BlockList.tsx +++ b/frontend/src/components/BlockList.tsx @@ -12,14 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -type Props = { - children: React.ReactNode; -}; +import styles from "./BlockList.module.css"; -const BlockList: React.FC = ({ children }) => { - return ( -
{children}
- ); +const BlockList: React.FC> = ({ children }) => { + return
{children}
; }; export default BlockList; diff --git a/frontend/src/components/BrowserSession.module.css b/frontend/src/components/BrowserSession.module.css new file mode 100644 index 00000000..bc02b22c --- /dev/null +++ b/frontend/src/components/BrowserSession.module.css @@ -0,0 +1,24 @@ +/* Copyright 2023 The Matrix.org Foundation C.I.C. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +.session-icon { + color: var(--cpd-color-icon-secondary); + background: var(--cpd-color-bg-subtle-secondary); + height: var(--cpd-space-10x); + width: var(--cpd-space-10x); + padding: var(--cpd-space-2x); + border-radius: var(--cpd-space-1x); + margin-right: var(--cpd-space-2x); +} diff --git a/frontend/src/components/BrowserSession.tsx b/frontend/src/components/BrowserSession.tsx index 9db0b845..e1f58a58 100644 --- a/frontend/src/components/BrowserSession.tsx +++ b/frontend/src/components/BrowserSession.tsx @@ -22,7 +22,7 @@ import { useTransition } from "react"; import { currentBrowserSessionIdAtom, currentUserIdAtom } from "../atoms"; import { FragmentType, graphql, useFragment } from "../gql"; -import Block from "./Block"; +import styles from "./BrowserSession.module.css"; import DateTime from "./DateTime"; const FRAGMENT = graphql(/* GraphQL */ ` @@ -92,8 +92,8 @@ const BrowserSession: React.FC = ({ session, isCurrent }) => { }; return ( - - +
+
{isCurrent ? ( @@ -118,7 +118,7 @@ const BrowserSession: React.FC = ({ session, isCurrent }) => { > Sign out - +
); }; diff --git a/frontend/src/components/CompatSession.tsx b/frontend/src/components/CompatSession.tsx index 8708d27d..b76c22e0 100644 --- a/frontend/src/components/CompatSession.tsx +++ b/frontend/src/components/CompatSession.tsx @@ -82,7 +82,7 @@ const CompatSession: React.FC<{ }; return ( - + Started: diff --git a/frontend/src/components/Layout.module.css b/frontend/src/components/Layout.module.css new file mode 100644 index 00000000..2bd07c8e --- /dev/null +++ b/frontend/src/components/Layout.module.css @@ -0,0 +1,31 @@ +/* Copyright 2023 The Matrix.org Foundation C.I.C. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +.container { + width: 378px; + margin: var(--cpd-space-10x) auto var(--cpd-space-6x) auto; +} + +.footer { + text-align: center; +} + +.separator { + border: 0; + height: 1px; + background: var(--cpd-color-border-interactive-secondary); + margin: var(--cpd-space-4x) 0; +} + diff --git a/frontend/src/components/Layout.tsx b/frontend/src/components/Layout.tsx index bf95975d..2ad02220 100644 --- a/frontend/src/components/Layout.tsx +++ b/frontend/src/components/Layout.tsx @@ -12,24 +12,27 @@ // See the License for the specific language governing permissions and // limitations under the License. +import styles from "./Layout.module.css"; import NavBar from "./NavBar"; -import NavItem from "./NavItem"; +import NavItem, { ExternalLink } from "./NavItem"; + +const Separator: React.FC = () =>
; const Layout: React.FC<{ children?: React.ReactNode }> = ({ children }) => { return ( - <> - +
+ Sessions Emails -
+ -
{children}
+
{children}
-
+ -
); }; diff --git a/frontend/src/components/NavBar.module.css b/frontend/src/components/NavBar.module.css new file mode 100644 index 00000000..a7f1020f --- /dev/null +++ b/frontend/src/components/NavBar.module.css @@ -0,0 +1,21 @@ +/* Copyright 2023 The Matrix.org Foundation C.I.C. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +.nav-bar-items { + display: flex; + flex-direction: row; + justify-content: center; + gap: var(--cpd-space-4x); +} diff --git a/frontend/src/components/NavBar.tsx b/frontend/src/components/NavBar.tsx index 8649d5de..d99ea012 100644 --- a/frontend/src/components/NavBar.tsx +++ b/frontend/src/components/NavBar.tsx @@ -12,12 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -const NavBar: React.FC<{ - className: string; - children: React.ReactNode; -}> = ({ className, children }) => ( -