mirror of
https://github.com/ershisan99/DevToysWeb.git
synced 2025-12-17 20:49:24 +00:00
feat: add Json <> Yaml converter
This commit is contained in:
21
src/components/common/Configurations.tsx
Normal file
21
src/components/common/Configurations.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Stack } from "@mui/material";
|
||||
import equal from "fast-deep-equal";
|
||||
import { ComponentPropsWithoutRef, memo } from "react";
|
||||
|
||||
import Configuration from "./Configuration";
|
||||
|
||||
type Props = {
|
||||
configurations: ComponentPropsWithoutRef<typeof Configuration>[];
|
||||
};
|
||||
|
||||
const StyledComponent = ({ configurations }: Props) => (
|
||||
<Stack spacing={1}>
|
||||
{configurations.map(({ icon, title, input }) => (
|
||||
<Configuration key={title} {...{ icon, title, input }} />
|
||||
))}
|
||||
</Stack>
|
||||
);
|
||||
|
||||
export const Component = memo(StyledComponent, equal);
|
||||
|
||||
export default Component;
|
||||
Reference in New Issue
Block a user