feat: add Json <> Yaml converter

This commit is contained in:
rusconn
2022-03-26 03:18:44 +00:00
parent 55fd4a6473
commit 20df0b8c19
16 changed files with 398 additions and 6 deletions

View File

@@ -0,0 +1,30 @@
import { Box, Paper, Stack, Typography } from "@mui/material";
import { css, Theme } from "@mui/material/styles";
import { memo, ReactNode } from "react";
type Props = {
icon: ReactNode;
title: string;
input: ReactNode;
};
const paper = (theme: Theme) => css`
padding: ${theme.spacing(2)};
height: ${theme.spacing(8)};
`;
const StyledComponent = ({ icon, title, input }: Props) => (
<Paper css={paper}>
<Stack direction="row" alignItems="center" height={theme => theme.spacing(4)}>
<Stack direction="row" spacing={2}>
{icon}
<Typography>{title}</Typography>
</Stack>
<Box marginLeft="auto">{input}</Box>
</Stack>
</Paper>
);
export const Component = memo(StyledComponent);
export default Component;