-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Fran McDade <[email protected]>
- Loading branch information
Showing
20 changed files
with
322 additions
and
284 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/components/Layout/components/Header/components/Content/components/Logo/logo.tsx
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
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,29 @@ | ||
import { AlertProps } from "@mui/material"; | ||
import { COLOR, SEVERITY, VARIANT } from "../../../styles/common/mui/alert"; | ||
|
||
export const ALERT_PROPS: Record<string, Partial<AlertProps>> = { | ||
FILLED_INK: { | ||
color: COLOR.INK, | ||
variant: VARIANT.FILLED, | ||
}, | ||
FILLED_PRIMARY: { | ||
color: COLOR.PRIMARY, | ||
variant: VARIANT.FILLED, | ||
}, | ||
FILLED_SMOKE: { | ||
color: COLOR.SMOKE, | ||
variant: VARIANT.FILLED, | ||
}, | ||
STANDARD_ERROR: { | ||
severity: SEVERITY.ERROR, | ||
}, | ||
STANDARD_INFO: { | ||
severity: SEVERITY.INFO, | ||
}, | ||
STANDARD_SUCCESS: { | ||
severity: SEVERITY.SUCCESS, | ||
}, | ||
STANDARD_WARNING: { | ||
severity: SEVERITY.WARNING, | ||
}, | ||
}; |
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,5 @@ | ||
export interface UseTransition { | ||
isIn: boolean; | ||
onEnter: () => void; | ||
onExit: () => void; | ||
} |
25 changes: 25 additions & 0 deletions
25
src/components/common/Alert/hooks/useTransition/useTransition.ts
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,25 @@ | ||
import { useCallback, useState } from "react"; | ||
import { UseTransition } from "./types"; | ||
|
||
/** | ||
* Hook to manage transition state for alert component wrapped in a transition component. | ||
* @param initialState - Initial state of the transition. | ||
* @returns transition state and handlers. | ||
*/ | ||
export const useTransition = (initialState?: boolean): UseTransition => { | ||
const [isIn, setIsIn] = useState<boolean>(initialState || false); | ||
|
||
const onEnter = useCallback((): void => { | ||
setIsIn(true); | ||
}, []); | ||
|
||
const onExit = useCallback((): void => { | ||
setIsIn(false); | ||
}, []); | ||
|
||
return { | ||
isIn, | ||
onEnter, | ||
onExit, | ||
}; | ||
}; |
9 changes: 9 additions & 0 deletions
9
src/components/common/Banner/components/CookieBanner/constants.ts
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,9 @@ | ||
import { AlertProps } from "@mui/material"; | ||
import { COLOR, VARIANT } from "../../../../../styles/common/mui/alert"; | ||
|
||
export const ALERT_PROPS: Partial<AlertProps> = { | ||
color: COLOR.INK, | ||
elevation: 2, | ||
icon: false, | ||
variant: VARIANT.FILLED, | ||
}; |
13 changes: 2 additions & 11 deletions
13
src/components/common/Banner/components/CookieBanner/cookieBanner.styles.ts
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
44 changes: 0 additions & 44 deletions
44
src/components/common/Banner/components/DismissibleBanner/dismissibleBanner.tsx
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
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 @@ | ||
export interface BaseComponentProps { | ||
className?: string; | ||
} |
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,24 @@ | ||
import { AlertProps } from "@mui/material"; | ||
|
||
export const COLOR: Record<string, AlertProps["color"]> = { | ||
ERROR: "error", | ||
INFO: "info", | ||
INK: "ink", | ||
PRIMARY: "primary", | ||
SMOKE: "smoke", | ||
SUCCESS: "success", | ||
WARNING: "warning", | ||
}; | ||
|
||
export const SEVERITY: Record<string, AlertProps["severity"]> = { | ||
ERROR: "error", | ||
INFO: "info", | ||
SUCCESS: "success", | ||
WARNING: "warning", | ||
}; | ||
|
||
export const VARIANT: Record<string, AlertProps["variant"]> = { | ||
FILLED: "filled", | ||
OUTLINED: "outlined", | ||
STANDARD: "standard", | ||
}; |
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,8 @@ | ||
import { IconProps } from "@mui/material"; | ||
|
||
export const FONT_SIZE: Record<string, IconProps["fontSize"]> = { | ||
INHERIT: "inherit", | ||
LARGE: "large", | ||
MEDIUM: "medium", | ||
SMALL: "small", | ||
}; |
Oops, something went wrong.