-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: uptake and merge card (#3922)
- Loading branch information
1 parent
fc8ac39
commit 71d707e
Showing
34 changed files
with
578 additions
and
426 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
declare module "*.scss" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.form-card { | ||
--card-content-padding-inline: var(--seeds-s12); | ||
--card-header-padding-inline: var(--seeds-s12); | ||
@media (max-width: theme("screens.sm")) { | ||
--card-content-padding-inline: var(--seeds-s4); | ||
--card-header-padding-inline: var(--seeds-s4); | ||
--card-border-radius: 0; | ||
--card-content-padding-block: var(--seeds-s6); | ||
} | ||
width: 100%; | ||
} | ||
|
||
.block-card { | ||
width: 100%; | ||
height: 100%; | ||
justify-content: space-between; | ||
--subheading-color: var(--seeds-text-color-light); | ||
--heading-margin: var(--seeds-s3); | ||
@media (max-width: theme("screens.sm")) { | ||
--card-spacing-lg: var(--seeds-s6); | ||
} | ||
} | ||
|
||
.card-icon { | ||
margin-bottom: var(--seeds-s3); | ||
} | ||
|
||
.card-heading-group { | ||
--subheading-color: var(--seeds-text-color-light); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { Heading, HeadingGroup, Icon } from "@bloom-housing/ui-seeds" | ||
import Card from "@bloom-housing/ui-seeds/src/blocks/Card" | ||
import React from "react" | ||
import styles from "./BloomCard.module.scss" | ||
import { CustomIconMap, CustomIconType } from "../accounts/CustomIconMap" | ||
|
||
interface BloomCardProps { | ||
iconSymbol?: CustomIconType | ||
title?: string | ||
subtitle?: string | React.ReactNode | ||
children: React.ReactElement | ||
id?: string | ||
headingPriority?: 1 | 2 | 3 | 4 | 5 | 6 | ||
className?: string | ||
variant?: "form" | "block" | ||
headerLink?: React.ReactNode | ||
} | ||
|
||
const BloomCard = (props: BloomCardProps) => { | ||
const classNames = [props.variant === "block" ? styles["block-card"] : styles["form-card"]] | ||
if (props.className) classNames.push(props.className) | ||
|
||
const customIcon = props.iconSymbol ? CustomIconMap[props.iconSymbol] : undefined | ||
|
||
const getTitle = () => { | ||
if (props.title) { | ||
if (props.subtitle) { | ||
return ( | ||
<HeadingGroup | ||
size="2xl" | ||
heading={props.title} | ||
subheading={props.subtitle} | ||
className={styles["card-heading-group"]} | ||
headingPriority={props.headingPriority || 1} | ||
/> | ||
) | ||
} | ||
return ( | ||
<Heading size="2xl" priority={props.headingPriority || 1}> | ||
{props.title} | ||
</Heading> | ||
) | ||
} | ||
return null | ||
} | ||
|
||
const title = getTitle() | ||
|
||
return ( | ||
<Card spacing="lg" className={classNames.join(" ")}> | ||
{title && ( | ||
<Card.Header divider={props.variant === "block" ? undefined : "inset"}> | ||
{customIcon && ( | ||
<Icon size="2xl" className={styles["card-icon"]}> | ||
{customIcon} | ||
</Icon> | ||
)} | ||
{props.headerLink && props.headerLink} | ||
{title} | ||
</Card.Header> | ||
)} | ||
|
||
{props.children} | ||
</Card> | ||
) | ||
} | ||
|
||
export { BloomCard as default, BloomCard } |
3 changes: 3 additions & 0 deletions
3
shared-helpers/src/views/forgot-password/FormForgotPassword.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.forgot-password-submit-button { | ||
margin-top: var(--seeds-s1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.forgot-password { | ||
float: right; | ||
font-size: var(--seeds-font-size-sm); | ||
text-decoration-line: underline; | ||
color: var(--seeds-color-blue-900); | ||
} | ||
|
||
.sign-in-error-container { | ||
margin-inline: var(--seeds-s4); | ||
|
||
@media (min-width: theme("screens.sm")) { | ||
margin-inline: var(--seeds-s12); | ||
} | ||
} | ||
|
||
.sign-in-error { | ||
margin-top: var(--seeds-s6); | ||
width: 100%; | ||
} |
Oops, something went wrong.