diff --git a/site/src/components/Welcome/Welcome.stories.tsx b/site/src/components/Welcome/Welcome.stories.tsx new file mode 100644 index 0000000000000..f7f4e2d2bcd09 --- /dev/null +++ b/site/src/components/Welcome/Welcome.stories.tsx @@ -0,0 +1,14 @@ +import type { Meta, StoryObj } from "@storybook/react"; +import { Welcome } from "./Welcome"; + +const meta: Meta = { + title: "components/Welcome", + component: Welcome, +}; + +export default meta; +type Story = StoryObj; + +const Example: Story = {}; + +export { Example as Welcome }; diff --git a/site/src/components/Welcome/Welcome.tsx b/site/src/components/Welcome/Welcome.tsx index 9036717866efd..4863fa15c2c3c 100644 --- a/site/src/components/Welcome/Welcome.tsx +++ b/site/src/components/Welcome/Welcome.tsx @@ -1,5 +1,5 @@ +import { type Interpolation, type Theme } from "@emotion/react"; import { type FC, type PropsWithChildren } from "react"; -import { useTheme } from "@emotion/react"; import { CoderIcon } from "../Icons/CoderIcon"; const Language = { @@ -10,43 +10,39 @@ const Language = { ), }; -export const Welcome: FC< - PropsWithChildren<{ message?: JSX.Element | string }> -> = ({ message = Language.defaultMessage }) => { - const theme = useTheme(); - +export const Welcome: FC = ({ children }) => { return (
-
- +
+
-

- {message} -

+

{children || Language.defaultMessage}

); }; + +const styles = { + container: { + display: "flex", + justifyContent: "center", + }, + + icon: (theme) => ({ + color: theme.palette.text.primary, + fontSize: 64, + }), + + header: { + textAlign: "center", + fontSize: 32, + fontWeight: 400, + margin: 0, + marginTop: 16, + marginBottom: 32, + lineHeight: 1.25, + + "& strong": { + fontWeight: 600, + }, + }, +} satisfies Record>; diff --git a/site/src/pages/CliAuthPage/CliAuthPageView.tsx b/site/src/pages/CliAuthPage/CliAuthPageView.tsx index 0c88a394b77ea..5fe488103737a 100644 --- a/site/src/pages/CliAuthPage/CliAuthPageView.tsx +++ b/site/src/pages/CliAuthPage/CliAuthPageView.tsx @@ -20,7 +20,7 @@ export const CliAuthPageView: FC = ({ sessionToken }) => { return ( - + Session token

{ // show an error there? return ( - + Failed to validate oauth access token +

Attempted to validate the user's oauth access token from the authentication flow. This situation may occur as a result of an diff --git a/site/src/pages/ExternalAuthPage/ExternalAuthPageView.tsx b/site/src/pages/ExternalAuthPage/ExternalAuthPageView.tsx index 85195d6659de4..893cf8fb69321 100644 --- a/site/src/pages/ExternalAuthPage/ExternalAuthPageView.tsx +++ b/site/src/pages/ExternalAuthPage/ExternalAuthPageView.tsx @@ -33,7 +33,7 @@ const ExternalAuthPageView: FC = ({ if (!externalAuth.authenticated) { return ( - + Authenticate with {externalAuth.display_name} {externalAuth.device && ( = ({ return ( - + + You've authenticated with {externalAuth.display_name}! + +

{externalAuth.user?.login && `Hey @${externalAuth.user?.login}! 👋 `} {(!externalAuth.app_installable ||