country flag and layout components

This commit is contained in:
fmtabbara
2024-12-12 23:27:52 +00:00
committed by Yana
parent 33c30624d2
commit 7c0a45ed52
2 changed files with 47 additions and 0 deletions
@@ -0,0 +1,26 @@
import { Box, type BoxProps } from "@mui/material";
export const ContentLayout = ({
children,
component: Component = "div",
className,
sx,
...rest
}: BoxProps) => {
return (
<Box
component={Component}
sx={{
display: "flex",
flexDirection: "column",
gap: { xs: "30px", md: "200px" },
py: { xs: "30px", md: "100px" },
...sx,
}}
className={className}
{...rest}
>
{children}
</Box>
);
};
@@ -0,0 +1,21 @@
import { Stack, Typography } from "@mui/material";
import Flag from "react-world-flags";
interface ICountryFlag {
countryCode: string;
countryName?: string;
}
const CountryFlag = ({ countryCode, countryName }: ICountryFlag) => {
return (
<Stack direction="row" gap={1}>
<Flag code={countryCode} width="19" />
<Typography variant="subtitle2" sx={{ color: "pine.950" }}>
{countryName}
</Typography>
</Stack>
);
};
export default CountryFlag;
export type { ICountryFlag };