Fix QC
# fix - authentication - profile - pencarian user - forum ## No issue
This commit is contained in:
25
src/app_modules/component_global/error_input.tsx
Normal file
25
src/app_modules/component_global/error_input.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
"use client";
|
||||
|
||||
import { Group, Text } from "@mantine/core";
|
||||
import { IconAlertTriangle } from "@tabler/icons-react";
|
||||
|
||||
export default function ComponentGlobal_ErrorInput({
|
||||
max,
|
||||
text,
|
||||
color,
|
||||
}: {
|
||||
max?: number;
|
||||
text?: string;
|
||||
color?: string;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<Group spacing={"xs"}>
|
||||
<IconAlertTriangle size={15} color={color ? color : "red"} />
|
||||
<Text fz={10} fs={"italic"} color={color ? color : "red"}>
|
||||
{text ? text : ` Maksimal ${max ? max : "-"} karakter !`}
|
||||
</Text>
|
||||
</Group>
|
||||
</>
|
||||
);
|
||||
}
|
||||
23
src/app_modules/component_global/input_countdown.tsx
Normal file
23
src/app_modules/component_global/input_countdown.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
"use client";
|
||||
|
||||
import { Text } from "@mantine/core";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function ComponentGlobal_InputCountDown({
|
||||
maxInput,
|
||||
lengthInput,
|
||||
}: {
|
||||
maxInput: number;
|
||||
lengthInput: number;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<Text fz={"xs"} fs={"italic"} color="gray">
|
||||
{maxInput - lengthInput < 0 ? 0 : maxInput - lengthInput} /{" "}
|
||||
<Text span inherit c={maxInput - lengthInput < 0 ? "red" : ""} style={{transition: "0.5s"}}>
|
||||
{maxInput}
|
||||
</Text>
|
||||
</Text>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user