UI/fonts: migrate all text-* classes

This commit is contained in:
Johannes Kirschbauer
2024-11-19 15:33:30 +01:00
parent 78dbeb6276
commit eecd39b24a
14 changed files with 37 additions and 43 deletions

View File

@@ -219,7 +219,7 @@ export function SelectInput(props: SelectInputpProps) {
<span class="label-text text-neutral">{props.helperText}</span>
)}
{props.error && (
<span class="label-text-alt font-bold text-error">
<span class="label-text-alt font-bold text-error-700">
{props.error}
</span>
)}

View File

@@ -60,7 +60,9 @@ export function TextInput(props: TextInputProps) {
<span class="label-text text-neutral">{props.helperText}</span>
)}
{props.error && (
<span class="label-text-alt font-bold text-error">{props.error}</span>
<span class="label-text-alt font-bold text-error-700">
{props.error}
</span>
)}
</div>
</label>

View File

@@ -132,7 +132,7 @@ interface UnsupportedProps {
const Unsupported = (props: UnsupportedProps) => (
<div>
{props.error && <div class="font-bold text-error">{props.error}</div>}
{props.error && <div class="font-bold text-error-700">{props.error}</div>}
<span>
Invalid or unsupported schema entry of type:{" "}
<b>{JSON.stringify(props.schema.type)}</b>
@@ -193,7 +193,7 @@ export function StringField<T extends FieldValues, R extends ResponseData>(
props.schema.type !== "integer"
) {
return (
<span class="text-error">
<span class="text-error-700">
Error cannot render the following as String input.
<Unsupported schema={props.schema} />
</span>
@@ -339,7 +339,9 @@ interface OptionSchemaProps {
}
export function OptionSchema(props: OptionSchemaProps) {
return (
<Switch fallback={<option class="text-error">Item spec unhandled</option>}>
<Switch
fallback={<option class="text-error-700">Item spec unhandled</option>}
>
<Match when={typeof props.itemSpec === "string" && props.itemSpec}>
{(o) => <option>{o()}</option>}
</Match>
@@ -444,7 +446,7 @@ export function ArrayFields<T extends FieldValues, R extends ResponseData>(
) {
if (props.schema.type !== "array") {
return (
<span class="text-error">
<span class="text-error-700">
Error cannot render the following as array.
<Unsupported schema={props.schema} />
</span>
@@ -621,7 +623,7 @@ export function ArrayFields<T extends FieldValues, R extends ResponseData>(
</ListValueDisplay>
)}
</For>
<span class="label-text-alt font-bold text-error">
<span class="label-text-alt font-bold text-error-700">
{fieldArray.error}
</span>
@@ -703,7 +705,7 @@ export function ObjectFields<T extends FieldValues, R extends ResponseData>(
) {
if (props.schema.type !== "object") {
return (
<span class="text-error">
<span class="text-error-700">
Error cannot render the following as Object
<Unsupported schema={props.schema} />
</span>
@@ -748,7 +750,7 @@ export function ObjectFields<T extends FieldValues, R extends ResponseData>(
/>
)}
{typeof propSchema === "boolean" && (
<span class="text-error">
<span class="text-error-700">
Schema: Object of Boolean not supported
</span>
)}