mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 12:30:12 +02:00
25 lines
576 B
TypeScript
25 lines
576 B
TypeScript
import React from 'react';
|
|
import styled from 'styled-components';
|
|
import { Text } from '/@/renderer/components';
|
|
|
|
interface ServerSectionProps {
|
|
children: React.ReactNode;
|
|
title: string | React.ReactNode;
|
|
}
|
|
|
|
const Container = styled.div``;
|
|
|
|
const Section = styled.div`
|
|
padding: 1rem;
|
|
border: 1px dashed var(--generic-border-color);
|
|
`;
|
|
|
|
export const ServerSection = ({ title, children }: ServerSectionProps) => {
|
|
return (
|
|
<Container>
|
|
{React.isValidElement(title) ? title : <Text>{title}</Text>}
|
|
<Section>{children}</Section>
|
|
</Container>
|
|
);
|
|
};
|