feat: add tailwind css.

This commit is contained in:
2023-03-18 16:41:15 +08:00
parent 3b52a796fc
commit 6ea8325b15
10 changed files with 505 additions and 160 deletions

View File

@ -0,0 +1,39 @@
import { Component, ParentComponent } from 'solid-js';
import { DisplayInfo } from '../models/display-info.model';
type DisplayInfoItemProps = {
label: string;
};
export const DisplayInfoItem: ParentComponent<DisplayInfoItemProps> = (props) => {
return (
<dl class="m-1 flex hover:bg-gray-100 gap-2 text-gray-700">
<dt class="uppercase w-1/3">{props.label}</dt>
<dd>{props.children}</dd>
</dl>
);
};
type DisplayInfoPanelProps = {
display: DisplayInfo;
};
export const DisplayInfoPanel: Component<DisplayInfoPanelProps> = (props) => {
return (
<section class="m-2">
<DisplayInfoItem label="ID">
<code>{props.display.id}</code>
</DisplayInfoItem>
<DisplayInfoItem label="Position">
({props.display.x}, {props.display.y})
</DisplayInfoItem>
<DisplayInfoItem label="Size">
{props.display.width} x {props.display.height}
</DisplayInfoItem>
<DisplayInfoItem label="Scale Factor">{props.display.scale_factor}</DisplayInfoItem>
<DisplayInfoItem label="is Primary">
{props.display.is_primary ? 'True' : 'False'}
</DisplayInfoItem>
</section>
);
};