Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: unify styling of error messages #157

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/components/general/form/FormError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface FormErrorProps {
const FormError = ({ error, show }: FormErrorProps) => {
return (
<p
className={`text-red font-medium mt-10 ${show ? "" : "hidden"}`}
className={`text-red font-semiboold text-sm mt-10 ${show ? "" : "hidden"}`}
>
{error}
</p>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/general/form/types/FileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const FileUpload: React.FC<FileUploadProps> = ({
</div>

{message && (
<div className="mt-4 text-red">
<div className="mt-4 text-red font-semibold text-sm">
{message}
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/general/form/types/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const Input = forwardRef(
{...props}
/>
{props.error && (
<span className="text-red mt-2 font-semibold text-sm">
<span className="block text-red mt-2 font-semibold text-sm">
{props.error}
</span>
)}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/general/form/types/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const Select = forwardRef(
))}
</select>
{props.error && (
<span className="text-red mt-2 font-semibold text-sm">
<span className="block text-red mt-2 font-semibold text-sm">
{props.error}
</span>
)}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/general/form/types/SelectTrees.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const SelectTrees: React.FC<SelectTreesProps> = ({

<ul className="space-y-3">
{treeIds.length === 0 ? (
<li className="text-red">
<li className="text-red font-semibold text-sm">
<p>Bitte wählen Sie mindestens einen Baum aus.</p>
</li>
) : (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/general/form/types/Textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const Textarea = forwardRef(
{...props}
/>
{props.error && (
<span className="text-red mt-2 font-semibold text-sm">{props.error}</span>
<span className="block text-red mt-2 font-semibold text-sm">{props.error}</span>
)}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function SelectTrees() {
content={
<ul className="space-y-3">
{(treeIds?.length || 0) === 0 || showError ? (
<li className="text-red">
<li className="text-red font-semibold text-sm">
<p>Bitte wählen Sie mindestens einen Baum aus.</p>
</li>
) : (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/_protected/tree/$treeId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function SingleTree() {
<Suspense fallback={<LoadingInfo label="Baumdaten werden geladen …" />}>
<ErrorBoundary
fallback={
<p className="text-red text-lg">
<p className="text-red text-lg font-semibold">
Einen Baum mit der Identifikationsnummer {treeId} gibt es nicht
oder die Baumdaten konnten nicht geladen werden.
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function EditTreeCluster() {
<Suspense fallback={<LoadingInfo label="Baumdaten werden geladen …" />}>
<ErrorBoundary
fallback={
<p className="text-red text-lg">
<p className="text-red text-lg font-semibold">
Einen Baum mit der Identifikationsnummer {treeId} gibt es nicht
oder die Baumdaten konnten nicht geladen werden.
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function SingleTreecluster() {
>
<ErrorBoundary
fallback={
<p className="text-red text-lg">
<p className="text-red text-lg font-semibold">
Eine Bewässerungsgruppe mit der Identifikationsnummer {clusterId}{' '}
gibt es nicht oder die Bewässerungsgruppendaten konnten nicht
geladen werden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function SingleTree() {
<Suspense fallback={<LoadingInfo label="Baumdaten werden geladen …" />}>
<ErrorBoundary
fallback={
<p className="text-red text-lg">
<p className="text-red text-lg font-semibold">
Einen Baum mit der Identifikationsnummer {treeId} gibt es nicht
oder die Baumdaten konnten nicht geladen werden.
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function EditTreeCluster() {
>
<ErrorBoundary
fallback={
<p className="text-red text-lg">
<p className="text-red text-lg font-semibold">
Eine Bewässerungsgruppe mit der Nummer {clusterId} gibt es nicht
oder die Daten zur Bewässerungsgruppe konnten nicht geladen
werden.
Expand Down