diff --git a/src/header/tool-selectors/tool-selectors-narrow/ToolSelectorsNarrow.module.scss b/src/header/tool-selectors/tool-selectors-narrow/ToolSelectorsNarrow.module.scss index 8d182f231..140e4d2b7 100644 --- a/src/header/tool-selectors/tool-selectors-narrow/ToolSelectorsNarrow.module.scss +++ b/src/header/tool-selectors/tool-selectors-narrow/ToolSelectorsNarrow.module.scss @@ -9,8 +9,7 @@ } svg { - height: $pad-xxl; - width: $pad-xxl; + @include icon-xxl; fill: none; path { @@ -25,8 +24,8 @@ left: 0; width: calc(100% - calc(2 * $pad-xxl)); z-index: 100; - height: $content-height; background-color: $black-100; padding: $pad-xxl; + @include content-height; } } diff --git a/src/header/tool-selectors/tool-selectors-narrow/tool-selector-narrow/ToolSelectorNarrow.module.scss b/src/header/tool-selectors/tool-selectors-narrow/tool-selector-narrow/ToolSelectorNarrow.module.scss index ff35f5e12..3e864b7f0 100644 --- a/src/header/tool-selectors/tool-selectors-narrow/tool-selector-narrow/ToolSelectorNarrow.module.scss +++ b/src/header/tool-selectors/tool-selectors-narrow/tool-selector-narrow/ToolSelectorNarrow.module.scss @@ -9,16 +9,15 @@ .tool-selector-narrow-link { display: flex; justify-content: space-between; + align-items: center; border-top: 1px solid $black-60; padding: $pad-lg 0; color: $tc-white; - font-size: 16px; - @include font-bold; + @include font-weight-medium; background-color: $black-100; svg { - width: $pad-lg; - height: $pad-lg; + @include icon-lg; fill: $tc-white; path { diff --git a/src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/ProfileLoggedIn.module.scss b/src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/ProfileLoggedIn.module.scss index f6a79fe8a..d4c19f025 100644 --- a/src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/ProfileLoggedIn.module.scss +++ b/src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/ProfileLoggedIn.module.scss @@ -2,7 +2,8 @@ $overlaySquare: calc($pad-xxxxl + 2 * $border); -a { +.profile-avater, +.overlay { cursor: pointer; } @@ -21,7 +22,6 @@ a { svg { stroke: $turq-160; stroke-width: $border; - height: $pad-xxl; - width: $pad-xxl; + @include icon-xxl; } } \ No newline at end of file diff --git a/src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/ProfileLoggedIn.tsx b/src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/ProfileLoggedIn.tsx index c55a0e594..becea8cfa 100644 --- a/src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/ProfileLoggedIn.tsx +++ b/src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/ProfileLoggedIn.tsx @@ -22,7 +22,7 @@ const ProfileLoggedIn: FC<{}> = () => { return ( <> -
toggleProfilePanel()} > +
toggleProfilePanel()} > = () => {
)}
- {profilePanelOpen && } + {profilePanelOpen && } ) } diff --git a/src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/profile-panel/ProfilePanel.module.scss b/src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/profile-panel/ProfilePanel.module.scss index 316a8ab7f..8ae0e6e21 100644 --- a/src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/profile-panel/ProfilePanel.module.scss +++ b/src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/profile-panel/ProfilePanel.module.scss @@ -1,6 +1,7 @@ @import '../../../../../../lib/styles'; .profile-panel { + @extend .body-small; position: absolute; z-index: 1000; top: calc($pad-xxxxl * 2); @@ -8,14 +9,12 @@ width: 168px; display: flex; flex-direction: column; - font-size: 14px; background: url('./profile-panel-header.png') no-repeat top center; filter: drop-shadow(0px 1px 5px rgba(0, 0, 0, 0.2)); .handle { padding: $pad-xl $pad-xl calc($pad-lg - 1px) $pad-xl; color: $tc-white; - line-height: 22px; } .logout, diff --git a/src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/profile-panel/ProfilePanel.tsx b/src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/profile-panel/ProfilePanel.tsx index 1434ceb02..0552a89fc 100644 --- a/src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/profile-panel/ProfilePanel.tsx +++ b/src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/profile-panel/ProfilePanel.tsx @@ -1,4 +1,5 @@ import { FC, useContext } from 'react' +import { Link } from 'react-router-dom' import { AuthenticationUrlConfig, @@ -9,7 +10,11 @@ import { import styles from './ProfilePanel.module.scss' -const ProfilePanel: FC<{}> = () => { +interface ProfilePanelProps { + toggleProfilePanel: () => void +} + +const ProfilePanel: FC = (props: ProfilePanelProps) => { const { profile }: ProfileContextData = useContext(ProfileContext) @@ -23,9 +28,13 @@ const ProfilePanel: FC<{}> = () => {
{profile.handle}
- + props.toggleProfilePanel()} + to={ProfileRouteConfig.profile} + > My Profile - + Log Out diff --git a/src/lib/avatar/Avatar.module.scss b/src/lib/avatar/Avatar.module.scss index 41bd8184d..7c5c112db 100644 --- a/src/lib/avatar/Avatar.module.scss +++ b/src/lib/avatar/Avatar.module.scss @@ -23,7 +23,7 @@ $avatar-size: 32px; align-items: center; color: $tc-white; background-color: $blue-100; - @include font-bold; + @include font-weight-medium; @extend .medium-subtitle; } } diff --git a/src/lib/content-layout/ContentLayout.module.scss b/src/lib/content-layout/ContentLayout.module.scss index 74d1ff3c0..378df1a16 100644 --- a/src/lib/content-layout/ContentLayout.module.scss +++ b/src/lib/content-layout/ContentLayout.module.scss @@ -1,46 +1,57 @@ @import '../styles/'; .content { - height: $content-height; - padding: $pad-xxl $pad-xxl $pad-xxl 0; - + @include content-height; + padding: $pad-xxxxl $pad-content-lg; display: grid; - @include font-roboto; + background-color: $black-10; + grid-template-columns: 1fr; + justify-content: center; .sections { - display: grid; + display: none; height: 200px; - } - - .sections { background-color: $tc-white; } - &.hide-sections { - grid-template-columns: 1fr; - justify-content: center; - padding-left: $pad-xxl; + &.show-sections { + padding-left: 0; .sections { - display: none; - } - } + display: grid; + } - @include ltemd { - grid-template-columns: 1fr; - justify-content: center; - padding-left: $pad-xxl; + @include md { + padding-left: $pad-xxl; + } - .sections { - display: none; + @include lg { + grid-template-columns: $left-col-width-lg 1fr; } + + @include xl { + grid-template-columns: $left-col-width-xl 1fr; + } + } + + @include md { + padding: $pad-xxl; } - @include lg { - grid-template-columns: $left-col-width-lg 1fr; + @include ltesm { + padding: 0; } - @include xl { - grid-template-columns: $left-col-width-xl 1fr; + .content-outer { + display: flex; + justify-content: center; + + .content-inner { + flex: 1; + background-color: $tc-white; + border-radius: $pad-sm; + max-width: $xl-max-content; + padding: $pad-xxl; + } } } diff --git a/src/lib/content-layout/ContentLayout.tsx b/src/lib/content-layout/ContentLayout.tsx index 9c90b06d2..71c512d42 100644 --- a/src/lib/content-layout/ContentLayout.tsx +++ b/src/lib/content-layout/ContentLayout.tsx @@ -1,7 +1,6 @@ import classNames from 'classnames' import { FC, ReactNode, useContext } from 'react' -import { ProfileContext, ProfileContextData } from '../profile-provider' import { PlatformRoute, RouteContextData } from '../route-provider' import RouteContext from '../route-provider/route.context' // cannot be imported from index file import '../styles/index.scss' @@ -18,7 +17,6 @@ export interface ContentLayoutProps { const ContentLayout: FC = (props: ContentLayoutProps) => { - const { profile }: ProfileContextData = useContext(ProfileContext) const { toolsRoutes, utilsRoutes }: RouteContextData = useContext(RouteContext) const rootRoute: PlatformRoute | undefined = [ @@ -34,19 +32,26 @@ const ContentLayout: FC = (props: ContentLayoutProps) => { toolRoute: rootRoute.route, })) || [] - const hideSectionsClass: string = !!sections.length ? '' : styles['hide-sections'] + const hideSectionsClass: string = !sections.length ? '' : styles['show-sections'] return ( <>
+ -
-

{props.title}

- {props.children} -
- Logged in as: {profile?.handle || 'Not Logged In'} + +
+ +
+ +

{props.title}

+ + {props.children} +
+
+
) diff --git a/src/lib/content-layout/sections/Sections.module.scss b/src/lib/content-layout/sections/Sections.module.scss index b11e0da74..ad45ae9c7 100644 --- a/src/lib/content-layout/sections/Sections.module.scss +++ b/src/lib/content-layout/sections/Sections.module.scss @@ -1,7 +1,7 @@ @import '../../styles/'; .sections { - height: $content-height; + @include content-height; @include ltemd { display: none; diff --git a/src/lib/content-layout/sections/section-selector/Section-Selector.module.scss b/src/lib/content-layout/sections/section-selector/Section-Selector.module.scss index 66f0f9c43..62e0df815 100644 --- a/src/lib/content-layout/sections/section-selector/Section-Selector.module.scss +++ b/src/lib/content-layout/sections/section-selector/Section-Selector.module.scss @@ -23,8 +23,7 @@ $svg-size: $pad-xxxxl; } svg { - width: $svg-size; - height: $svg-size; + @include icon-xxxxl; fill: none; path { @@ -36,12 +35,12 @@ $svg-size: $pad-xxxxl; .title { text-align: center; - /* TODO: replace below this w/a named design system font class */ - font-size: 11px; - font-weight: 600; - line-height: 14px; - letter-spacing: 0px; - text-transform: uppercase; color: $black-60; + // extend ultra small and override it + @extend .ultra-small; + font-style: normal; + @include font-weight-semi-bold; + line-height: 14px; + text-transform: uppercase; } } \ No newline at end of file diff --git a/src/lib/form-elements/form-field/Form-Field.module.scss b/src/lib/form-elements/form-field/Form-Field.module.scss new file mode 100644 index 000000000..2bae26f7e --- /dev/null +++ b/src/lib/form-elements/form-field/Form-Field.module.scss @@ -0,0 +1,78 @@ +@import '../../styles'; + +$form-pad-top: calc($pad-md - $border); +$border-xs: 1px; + +.form-field-container { + position: relative; + display: flex; + flex-direction: column; + justify-content: flex-start; + padding-bottom: $pad-md; + + .form-field { + display: flex; + flex-direction: column; + align-items: flex-start; + padding: $pad-sm $form-pad-top; + height: calc($pad-xxl * 2); + background: $tc-white; + border: $border-xs solid $black-40; + box-sizing: border-box; + border-radius: $pad-xs; + + &:hover, + &.focus { + border-color: $turq-160; + + &.form-field-error { + border-color: $red-100; + } + } + + &.focus, + &.form-field-error { + border-width: $border; + padding: calc($pad-sm - $border-xs) calc($form-pad-top - $border-xs); + } + + &.disabled { + background-color: $black-10; + background: $black-10; + border-color: $black-40; + } + + &.form-field-error { + border-color: $red-100; + + .label { + color: $red-100; + } + } + + .label { + top: calc(50% - $form-pad-top/2); + color: $turq-160; + margin-bottom: $pad-xs; + // extend ultra-small and override some properties + @extend .ultra-small; + @include font-weight-medium; + line-height: calc($pad-md - $border); + } + } + + .error { + display: flex; + align-items: center; + color: $red-100; + // extend body ultra small and override it + @extend .body-ultra-small; + line-height: 14px; + + svg { + @include icon-md; + fill: $red-100; + margin-right: $pad-xs; + } + } +} \ No newline at end of file diff --git a/src/lib/form-elements/form-field/Form-Field.test.tsx b/src/lib/form-elements/form-field/Form-Field.test.tsx new file mode 100644 index 000000000..f241b6e3d --- /dev/null +++ b/src/lib/form-elements/form-field/Form-Field.test.tsx @@ -0,0 +1,6 @@ +import '@testing-library/jest-dom' + +describe(' ', () => { + + test('it should display the FormField', () => {}) +}) diff --git a/src/lib/form-elements/form-field/Form-Field.tsx b/src/lib/form-elements/form-field/Form-Field.tsx new file mode 100644 index 000000000..47032e0aa --- /dev/null +++ b/src/lib/form-elements/form-field/Form-Field.tsx @@ -0,0 +1,55 @@ +import classNames from 'classnames' +import { Dispatch, FC, ReactNode, SetStateAction, useState } from 'react' + +import { IconSolid } from '../..' + +import styles from './Form-Field.module.scss' + +interface FormFieldProps { + children: ReactNode + className?: string + disabled?: boolean + label: string + props?: { [attr: string]: string } + tabIndex: number +} + +const FormField: FC = (props: FormFieldProps) => { + + const [focusStyle, setFocusStyle]: [string | undefined, Dispatch>] = useState() + const formFieldClasses: string = classNames( + styles['form-field'], + props.disabled ? styles.disabled : undefined, + focusStyle, + props.props?.error ? styles['form-field-error'] : undefined + ) + + return ( +
+ +
setFocusStyle(undefined)} + onFocus={() => setFocusStyle(styles.focus)} + {...props} + > +
+ {props.label} +
+ {props.children} +
+ + {!!props.props?.error && ( +
+ + {props.props.error} +
+ )} +
+ ) +} + +export default FormField diff --git a/src/lib/form-elements/form-field/index.ts b/src/lib/form-elements/form-field/index.ts new file mode 100644 index 000000000..8b93521bf --- /dev/null +++ b/src/lib/form-elements/form-field/index.ts @@ -0,0 +1,2 @@ +export * from './text-input' +export { default as FormField } from './Form-Field' diff --git a/src/lib/form-elements/form-field/text-input/Text-Input.module.scss b/src/lib/form-elements/form-field/text-input/Text-Input.module.scss new file mode 100644 index 000000000..f8513c36f --- /dev/null +++ b/src/lib/form-elements/form-field/text-input/Text-Input.module.scss @@ -0,0 +1,21 @@ +@import '../../../styles'; + +.form-input-text { + @extend .body-small; + color: $black-60; + box-sizing: border-box; + border: 0; + width: 100%; + padding: 0; + + &:focus { + box-shadow: none; + border: none; + outline: none; + color: $black-100; + } + + &:disabled { + background-color: $black-10; + } +} diff --git a/src/lib/form-elements/form-field/text-input/Text-Input.test.tsx b/src/lib/form-elements/form-field/text-input/Text-Input.test.tsx new file mode 100644 index 000000000..bf32a169a --- /dev/null +++ b/src/lib/form-elements/form-field/text-input/Text-Input.test.tsx @@ -0,0 +1,6 @@ +import '@testing-library/jest-dom' + +describe(' ', () => { + + test('it should display the TextInput', () => {}) +}) diff --git a/src/lib/form-elements/form-field/text-input/Text-Input.tsx b/src/lib/form-elements/form-field/text-input/Text-Input.tsx new file mode 100644 index 000000000..6f67f3f79 --- /dev/null +++ b/src/lib/form-elements/form-field/text-input/Text-Input.tsx @@ -0,0 +1,24 @@ +import classNames from 'classnames' +import { FC } from 'react' + +import styles from './Text-Input.module.scss' + +interface TextInputProps { + defaultValue?: string + name: string + props: { [attr: string]: string | boolean } + styleName?: string +} + +const TextInput: FC = (props: TextInputProps) => { + return ( + + ) +} + +export default TextInput diff --git a/src/lib/form-elements/form-field/text-input/index.ts b/src/lib/form-elements/form-field/text-input/index.ts new file mode 100644 index 000000000..1988f9151 --- /dev/null +++ b/src/lib/form-elements/form-field/text-input/index.ts @@ -0,0 +1 @@ +export { default as TextInput } from './Text-Input' diff --git a/src/lib/form-elements/index.ts b/src/lib/form-elements/index.ts new file mode 100644 index 000000000..97d3ff77f --- /dev/null +++ b/src/lib/form-elements/index.ts @@ -0,0 +1 @@ +export * from './form-field' diff --git a/src/lib/index.ts b/src/lib/index.ts index a7cc83680..05087242b 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -1,9 +1,17 @@ export * from './avatar' export * from './content-layout' +export * from './form-elements' export * from './global-config.model' export * from './profile-provider' -export { AnalyticsService, AuthenticationUrlConfig, LoggingService } from './services' +export { + AnalyticsService, + AuthenticationUrlConfig, + LoggingService, +} from './services' export * from './svgs' -/* NOTE: this export must come _after_ the svgs export */ +/* + NOTE: this module is dependant on the svgs + and therefore must come _after_ the svgs export +*/ export * from './route-provider' diff --git a/src/lib/route-provider/route.provider.tsx b/src/lib/route-provider/route.provider.tsx index fc4508b78..8fea15c57 100644 --- a/src/lib/route-provider/route.provider.tsx +++ b/src/lib/route-provider/route.provider.tsx @@ -14,7 +14,7 @@ export const RouteProvider: FC = (props: RouteProviderProps) useEffect(() => { const getAndSetRoutes: () => Promise = async () => { - // TODO: try to make these prop names configurable instead of hard-codded + // TODO: try to make these prop names configurable instead of hard-codded const contextData: RouteContextData = { toolsRoutes: props.toolsRoutes.filter(route => route.enabled), utilsRoutes: props.utilsRoutes.filter(route => route.enabled), diff --git a/src/lib/styles/_breakpoints.scss b/src/lib/styles/_breakpoints.scss index e80799bf4..ebbd7126d 100644 --- a/src/lib/styles/_breakpoints.scss +++ b/src/lib/styles/_breakpoints.scss @@ -8,6 +8,7 @@ $md-max: 744px; $lg-min: 745px; $lg-max: 984px; $xl-min: 985px; +$xl-max-content: 1224px; // Usage: // .example { diff --git a/src/lib/styles/_buttons.scss b/src/lib/styles/_buttons.scss index 6225dbb90..588623871 100644 --- a/src/lib/styles/_buttons.scss +++ b/src/lib/styles/_buttons.scss @@ -11,12 +11,12 @@ a { a.button { color: $tc-white; text-transform: uppercase; - font-size: 12px; - line-height: 12px; padding: 10px 15px; border-radius: 25px; white-space: nowrap; - @include font-bolder; + // extend body ultra small medium and override it + @extend .body-ultra-small-medium; + line-height: 12px; &.secondary, &.all-white { @@ -31,7 +31,7 @@ a.button { &.all-white { background-color: $tc-white; border-color: $tc-white; - @include font-bold; + @include font-weight-medium; &:hover { box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.2); diff --git a/src/lib/styles/_fonts.scss b/src/lib/styles/_fonts.scss index d1a69821e..aa5175090 100644 --- a/src/lib/styles/_fonts.scss +++ b/src/lib/styles/_fonts.scss @@ -14,10 +14,16 @@ } /* FONT WEIGHTS */ -@mixin font-bold { +@mixin font-weight-less-bold { + font-weight: 400; +} +@mixin font-weight-medium { font-weight: 500; } -@mixin font-bolder { +@mixin font-weight-semi-bold { + font-weight: 600; +} +@mixin font-weight-bold { font-weight: 700; } diff --git a/src/lib/styles/_icons.scss b/src/lib/styles/_icons.scss new file mode 100644 index 000000000..42dc0f05f --- /dev/null +++ b/src/lib/styles/_icons.scss @@ -0,0 +1,21 @@ +@import 'layout'; + +@mixin icon-md { + height: $pad-md; + width: $pad-md; +} + +@mixin icon-lg { + height: $pad-lg; + width: $pad-lg; +} + +@mixin icon-xxl { + height: $pad-xxl; + width: $pad-xxl; +} + +@mixin icon-xxxxl { + height: $pad-xxxxl; + width: $pad-xxxxl; +} diff --git a/src/lib/styles/_layout.scss b/src/lib/styles/_layout.scss index aea684ada..7714a6732 100644 --- a/src/lib/styles/_layout.scss +++ b/src/lib/styles/_layout.scss @@ -17,7 +17,35 @@ $pad-xl: calc(5 * $pad-xs); // 20 $pad-xxl: calc(6 * $pad-xs); // 24 $pad-xxxl: calc(7 * $pad-xs); // 28 $pad-xxxxl: calc(8 * $pad-xs); // 32 -$content-height: calc(100vh - $header-height - calc(2 * $pad-xxl)); +$pad-content-lg: calc($pad-xxl + $pad-xxxxl); + +@mixin content-height { + + @include xxs { + height: calc(100vh - $header-height); + } + + @include xs { + height: calc(100vh - $header-height); + } + + @include sm { + height: calc(100vh - $header-height - calc(2 * $pad-xxl)); + } + + @include md { + height: calc(100vh - $header-height - calc(2 * $pad-xxl)); + } + + @include lg { + height: calc(100vh - $header-height - calc(2 * $pad-xxxxl)); + } + + @include xl { + height: calc(100vh - $header-height - calc(2 * $pad-xxxxl)); + } +} + .pad-xs { padding: $pad-xs; diff --git a/src/lib/styles/_typography.scss b/src/lib/styles/_typography.scss index b1f18512a..d6a429f9a 100644 --- a/src/lib/styles/_typography.scss +++ b/src/lib/styles/_typography.scss @@ -1,4 +1,5 @@ @import "fonts"; +@import "layout"; body { margin: 0; @@ -11,6 +12,33 @@ body { min-width: $xxs-max; } +h1, +h2, +h3 { + @include font-barlow-condensed; + color: $black-100; + text-transform: uppercase; + margin: 16px 0; +} + +h1 { + @include font-weight-semi-bold; + font-size: $header-height; + line-height: 72px; +} + +h2 { + @include font-weight-medium; + font-size: 60px; + line-height: 56px; +} + +h3 { + @include font-weight-medium; + font-size: 48px; + line-height: 48px; +} + .medium-subtitle { font-size: 14px; line-height: 16px; @@ -22,5 +50,32 @@ body { font-size: 20px; line-height: 16px; text-transform: uppercase; - @include font-bold; + @include font-weight-medium; +} + +.body-small { + font-size: 14px; + line-height: 22px; + @include font-weight-less-bold; +} + +.body-ultra-small, +.body-ultra-small-medium { + font-size: 12px; + line-height: 18px; +} + +.body-ultra-small { + @include font-weight-less-bold; +} + +.body-ultra-small-medium { + @include font-weight-bold; +} + +.ultra-small { + font-size: 11px; + line-height: 16px; + @include font-weight-less-bold; + font-style: italic; } \ No newline at end of file diff --git a/src/lib/styles/index.scss b/src/lib/styles/index.scss index 3508acf7d..fb4f93414 100644 --- a/src/lib/styles/index.scss +++ b/src/lib/styles/index.scss @@ -1,6 +1,7 @@ @import 'breakpoints'; @import 'buttons'; @import 'fonts'; +@import 'icons'; @import 'layout'; @import 'palette'; @import 'typography'; diff --git a/src/tools/self-service/SelfService.module.scss b/src/tools/self-service/SelfService.module.scss index 433469769..1d03eb47c 100644 --- a/src/tools/self-service/SelfService.module.scss +++ b/src/tools/self-service/SelfService.module.scss @@ -1,5 +1,5 @@ @import '../../lib/styles'; .self-service { - background-color: $turq-100; + } diff --git a/src/tools/tool/Tool.module.scss b/src/tools/tool/Tool.module.scss index addb03341..5cafaf58a 100644 --- a/src/tools/tool/Tool.module.scss +++ b/src/tools/tool/Tool.module.scss @@ -1,3 +1,3 @@ .tool { - background-color: green; + } diff --git a/src/utils/home/Home.module.scss b/src/utils/home/Home.module.scss index 5d53724a4..348ed5b7e 100644 --- a/src/utils/home/Home.module.scss +++ b/src/utils/home/Home.module.scss @@ -1,3 +1,2 @@ .home { - background-color: blue; } diff --git a/src/utils/profile/Profile.module.scss b/src/utils/profile/Profile.module.scss new file mode 100644 index 000000000..ef72d8392 --- /dev/null +++ b/src/utils/profile/Profile.module.scss @@ -0,0 +1,3 @@ +.profile { + +} diff --git a/src/utils/profile/Profile.routes.tsx b/src/utils/profile/Profile.routes.tsx new file mode 100644 index 000000000..976d0aced --- /dev/null +++ b/src/utils/profile/Profile.routes.tsx @@ -0,0 +1,13 @@ +import { PlatformRoute } from '../../lib' + +import Profile, { utilTitle } from './Profile' + +export const profileRoutes: Array = [ + { + children: [], + element: , + enabled: true, + route: '/profile', + title: utilTitle, + }, +] diff --git a/src/utils/profile/Profile.test.tsx b/src/utils/profile/Profile.test.tsx new file mode 100644 index 000000000..be676221e --- /dev/null +++ b/src/utils/profile/Profile.test.tsx @@ -0,0 +1,6 @@ +import '@testing-library/jest-dom' + +describe('', () => { + + test('it should render the Profile page', () => {}) +}) diff --git a/src/utils/profile/Profile.tsx b/src/utils/profile/Profile.tsx new file mode 100644 index 000000000..2b96e108c --- /dev/null +++ b/src/utils/profile/Profile.tsx @@ -0,0 +1,94 @@ +import { FC, useContext } from 'react' + +import { + ContentLayout, + FormField, + ProfileContext, + ProfileContextData, + TextInput, +} from '../../lib' + +import styles from './Profile.module.scss' + +export const utilTitle: string = 'Profile' + +const Profile: FC<{}> = () => { + + const { profile }: ProfileContextData = useContext(ProfileContext) + + // if we don't have a profile, we have a problem + // TODO: figure out how to lock down the profile + // so that it requires authentication + if (!profile) { + return <> + } + + // TODO: validation + + let tabIndex: number = 1 + + return ( + + +

Basic Information

+ +
+ + + + + + + + + + + + + + + + + +
+ +

Reset Password

+ +
+ + + + + + + + + + + + +
+ +
+ ) +} + +export default Profile diff --git a/src/utils/utils.routes.ts b/src/utils/utils.routes.ts index 09db9068d..bfba23748 100644 --- a/src/utils/utils.routes.ts +++ b/src/utils/utils.routes.ts @@ -1,9 +1,11 @@ import { PlatformRoute } from '../lib' import { homeRoutes } from './home/home.routes' +import { profileRoutes } from './profile/Profile.routes' const utilsRoutes: Array = [ ...homeRoutes, + ...profileRoutes, ] export default utilsRoutes