This commit is contained in:
josc146
2023-05-17 23:27:52 +08:00
parent df8eef5f64
commit 00257f2e68
15 changed files with 160 additions and 35 deletions

View File

@@ -1,9 +1,21 @@
import {FC, ReactElement} from 'react';
import {Label, Tooltip} from '@fluentui/react-components';
export const Labeled: FC<{ label: string; desc?: string, content: ReactElement }> = ({label, desc, content}) => {
export const Labeled: FC<{
label: string; desc?: string, content: ReactElement, flex?: boolean, spaceBetween?: boolean
}> = ({
label,
desc,
content,
flex,
spaceBetween
}) => {
return (
<div className="grid grid-cols-2 items-center">
<div className={
(flex ? 'flex' : 'grid grid-cols-2') + ' ' +
(spaceBetween ? 'justify-between' : '') + ' ' +
'items-center'
}>
{desc ?
<Tooltip content={desc} showDelay={0} hideDelay={0} relationship="description">
<Label>{label}</Label>

View File

@@ -1,7 +1,7 @@
import React, {FC, ReactElement} from 'react';
import {Divider, Text} from '@fluentui/react-components';
export const Page: FC<{ title: string; content: ReactElement }> = ({title, content = true}) => {
export const Page: FC<{ title: string; content: ReactElement }> = ({title, content}) => {
return (
<div className="flex flex-col gap-2 p-2 h-full">
<Text size={600}>{title}</Text>