ui/hostfile: convert to use css modules

This commit is contained in:
Johannes Kirschbauer
2025-07-30 16:30:46 +02:00
parent 17b75500fb
commit e5f8c515cd
3 changed files with 14 additions and 13 deletions

View File

@@ -1,11 +0,0 @@
div.form-field.host-file {
button {
@apply w-fit;
}
&.horizontal {
button {
@apply grow max-w-[18rem];
}
}
}

View File

@@ -0,0 +1,7 @@
.vertical_button {
@apply w-fit;
}
.horizontal_button {
@apply grow max-w-[18rem];
}

View File

@@ -7,7 +7,7 @@ import {
import cx from "classnames";
import { Label } from "./Label";
import { Button } from "../Button/Button";
import "./HostFileInput.css";
import styles from "./HostFileInput.module.css";
import { PolymorphicProps } from "@kobalte/core/polymorphic";
import { FieldProps } from "./Field";
import { Orienter } from "./Orienter";
@@ -41,7 +41,7 @@ export const HostFileInput = (props: HostFileInputProps) => {
return (
<TextField
class={cx("form-field", "host-file", props.size, props.orientation, {
class={cx("form-field", props.size, props.orientation, {
inverted: props.inverted,
ghost: props.ghost,
})}
@@ -73,6 +73,11 @@ export const HostFileInput = (props: HostFileInputProps) => {
startIcon="Folder"
onClick={selectFile}
disabled={props.disabled || props.readOnly}
class={cx(
props.orientation === "vertical"
? styles.vertical_button
: styles.horizontal_button,
)}
>
No Selection
</Button>