1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2025-06-15 13:36:35 +02:00

Migrate to FontAwesome v6

This commit is contained in:
Aleksandr Gumroian
2024-08-22 15:43:34 +02:00
parent 4c5aeed26e
commit 5f1372bb37
6 changed files with 118 additions and 22 deletions

View File

@ -7,6 +7,8 @@
import React from "react";
import { faMinus, faPlus } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import PropTypes from "prop-types";
import Input from "./Input";
@ -60,7 +62,7 @@ function NumberInput({ onChange, inlineText, value, ...props }) {
onMouseUp={() => enableIncrease(false)}
aria-label="Increase"
>
<i className="fas fa-plus" />
<FontAwesomeIcon icon={faPlus} />
</button>
<button
type="button"
@ -69,7 +71,7 @@ function NumberInput({ onChange, inlineText, value, ...props }) {
onMouseUp={() => enableDecrease(false)}
aria-label="Decrease"
>
<i className="fas fa-minus" />
<FontAwesomeIcon icon={faMinus} />
</button>
</Input>
);

View File

@ -7,6 +7,8 @@
import React, { useState } from "react";
import { faEye, faEyeSlash } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import PropTypes from "prop-types";
import Input from "./Input";
@ -44,8 +46,10 @@ function PasswordInput({ withEye, newPass, ...props }) {
setHidden((shouldBeHidden) => !shouldBeHidden);
}}
>
<i
className={`fa ${isHidden ? "fa-eye" : "fa-eye-slash"}`}
<FontAwesomeIcon
icon={isHidden ? faEye : faEyeSlash}
style={{ width: "1.25rem" }}
className="text-dark"
/>
</button>
)}