Initial theme designed

This commit is contained in:
David
2021-03-16 01:33:19 +01:00
parent 6153f739d2
commit 13877b5e11
16 changed files with 1739 additions and 120 deletions

26
components/LangSelect.tsx Normal file
View File

@@ -0,0 +1,26 @@
import { FC, ChangeEvent } from "react";
import { Select } from "@chakra-ui/react";
type Props = {
value: string,
onChange: (e: ChangeEvent<any>) => void,
langs: [string, string][],
[key: string]: any
};
const LangSelect: FC<Props> = ({ value, onChange, langs, ...props }) => (
<Select
value={value}
onChange={onChange}
variant="flushed"
px={2}
textAlign="center"
{...props}
>
{langs.map(([code, name]) => (
<option value={code} key={code}>{name}</option>
))}
</Select>
);
export default LangSelect;