-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into 23-Subtitle-is-using-camelCase-as-subTitl…
…e-in-Messages-created-on-portal
- Loading branch information
Showing
44 changed files
with
2,654 additions
and
1,067 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
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
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,47 @@ | ||
import { AccordionDetails, Stack } from "@mui/material"; | ||
import KeyboardArrowRightIcon from "@mui/icons-material/KeyboardArrowRight"; | ||
import { ReactNode, useState } from "react"; | ||
import { | ||
StyledAccordion, | ||
StyledTypography, | ||
SyledAccordionSummary, | ||
Title, | ||
} from "./styles"; | ||
|
||
type Props = { | ||
title: string; | ||
description?: string | null; | ||
children: ReactNode; | ||
}; | ||
|
||
const CarpAccordion = ({ title, description, children }: Props) => { | ||
const [expanded, setExpanded] = useState(false); | ||
const handleChange = () => { | ||
setExpanded((prev) => !prev); | ||
}; | ||
|
||
return ( | ||
<StyledAccordion elevation={2} onChange={handleChange} expanded={expanded}> | ||
<SyledAccordionSummary | ||
expandIcon={ | ||
<KeyboardArrowRightIcon | ||
sx={{ | ||
transform: expanded ? "rotate(-270deg)" : "rotate(0deg)", | ||
transition: "transform 0.3s ease", | ||
}} | ||
/> | ||
} | ||
> | ||
<Stack direction="column" gap="10px"> | ||
<Title variant="h3">{title}</Title> | ||
{description && expanded && ( | ||
<StyledTypography variant="h5">{description}</StyledTypography> | ||
)} | ||
</Stack> | ||
</SyledAccordionSummary> | ||
<AccordionDetails>{children}</AccordionDetails> | ||
</StyledAccordion> | ||
); | ||
}; | ||
|
||
export default CarpAccordion; |
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,28 @@ | ||
import { Accordion, AccordionSummary, Typography } from "@mui/material"; | ||
import { styled } from "@Utils/theme"; | ||
|
||
export const StyledAccordion = styled(Accordion)(({ expanded }) => ({ | ||
padding: "10px 24px", | ||
marginBottom: 32, | ||
borderRadius: expanded ? 16 : 8, | ||
transition: "border-radius 0.2s ease-in-out", | ||
"::before": { | ||
display: "none", | ||
}, | ||
":last-of-type": { | ||
borderRadius: expanded ? 16 : 8, | ||
}, | ||
})); | ||
|
||
export const SyledAccordionSummary = styled(AccordionSummary)({ | ||
padding: "0", | ||
borderRadius: 16, | ||
}); | ||
|
||
export const Title = styled(Typography)(({ theme }) => ({ | ||
color: theme.palette.primary.main, | ||
})); | ||
|
||
export const StyledTypography = styled(Typography)(({ theme }) => ({ | ||
color: theme.palette.text.secondary, | ||
})); |
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,18 @@ | ||
import i18n from "i18next"; | ||
import { initReactI18next } from "react-i18next"; | ||
import backend from "i18next-http-backend"; | ||
|
||
i18n | ||
.use(backend) | ||
.use(initReactI18next) | ||
.init({ | ||
supportedLngs: ["en", "da"], | ||
lng: "en", | ||
fallbackLng: "en", | ||
ns: ["common", "error", "deployment"], | ||
backend: { | ||
loadPath: "/locales/{{lng}}/{{ns}}.json", | ||
}, | ||
}); | ||
|
||
export default i18n; |
Oops, something went wrong.