import { Component, JSX, ParentComponent, splitProps } from 'solid-js'; import { DisplayInfo } from '../../models/display-info.model'; import { useLanguage } from '../../i18n/index'; type DisplayInfoItemProps = { label: string; }; export const DisplayInfoItem: ParentComponent = (props) => { return (
{props.label}
{props.children}
); }; type DisplayInfoPanelProps = { display: DisplayInfo; } & JSX.HTMLAttributes; export const DisplayInfoPanel: Component = (props) => { const [localProps, rootProps] = splitProps(props, ['display']); const { t } = useLanguage(); return (
{t('displays.displayInfo')} {localProps.display.is_primary && (
{t('displays.isPrimary')}
)}
{localProps.display.id} ({localProps.display.x}, {localProps.display.y}) {localProps.display.width} × {localProps.display.height} {localProps.display.scale_factor}×
); };