-
Matiss Janis Aboltins authored
This is direct copy & paste with no changes. Just moving things a bit to reduce the size of the massive common.tsx file
Matiss Janis Aboltins authoredThis is direct copy & paste with no changes. Just moving things a bit to reduce the size of the massive common.tsx file
InlineField.tsx 775 B
import { type ReactNode } from 'react';
import { type CSSProperties, css } from 'glamor';
type InlineFieldProps = {
label: ReactNode;
labelWidth?: number;
children?: ReactNode;
width: number;
style?: CSSProperties;
};
export default function InlineField({
label,
labelWidth,
children,
width,
style,
}: InlineFieldProps) {
return (
<label
{...css(
{
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
margin: '7px 0',
width,
},
style,
)}
>
<div
style={{
width: labelWidth || 75,
textAlign: 'right',
paddingRight: 10,
}}
>
{label}:
</div>
{children}
</label>
);
}