diff --git a/src/locales/pt-BR/translation.json b/src/locales/pt-BR/translation.json index 9e1021fc..653ef9ba 100644 --- a/src/locales/pt-BR/translation.json +++ b/src/locales/pt-BR/translation.json @@ -7,7 +7,7 @@ "featured": "Destaques", "hot": "Populares", "weekly": "📅 Mais baixados da semana", - "achievements": "🏆 Pra platinar", + "achievements": "🏆 Para platinar", "surprise_me": "Surpreenda-me", "no_results": "Nenhum resultado encontrado", "start_typing": "Comece a digitar para pesquisar…" diff --git a/src/renderer/src/components/text-field/text-field.scss b/src/renderer/src/components/text-field/text-field.scss index edcc1998..97c70ab6 100644 --- a/src/renderer/src/components/text-field/text-field.scss +++ b/src/renderer/src/components/text-field/text-field.scss @@ -29,47 +29,47 @@ border-color: vars.$danger-color; } - &__focused { + &--focused { border-color: vars.$search-border-color-focused; } &:not(&--focused):hover { border-color: vars.$search-border-color-hover; } -} -.text-field__input { - background-color: transparent; - border: none; - width: 100%; - height: 100%; - outline: none; - color: vars.$search-input-color; - cursor: default; - font-family: inherit; - text-overflow: ellipsis; - padding: vars.$spacing-unit; + &__input { + background-color: transparent; + border: none; + width: 100%; + height: 100%; + outline: none; + color: vars.$search-input-color; + cursor: default; + font-family: inherit; + text-overflow: ellipsis; + padding: vars.$spacing-unit; - &:focus { - cursor: text; + &:focus { + cursor: text; + } + + &__read-only { + text-overflow: inherit; + } } - &__read-only { - text-overflow: inherit; + &__toggle-password-button { + cursor: pointer; + color: vars.$muted-color; + padding: vars.$spacing-unit; } -} -.text-field__toggle-password-button { - cursor: pointer; - color: vars.$muted-color; - padding: vars.$spacing-unit; -} + &__wrapper { + display: flex; + gap: vars.$spacing-unit; + } -.text-field__wrapper { - display: flex; - gap: vars.$spacing-unit; -} - -.text-field__error-label { - color: vars.$danger-color; -} + &__error-label { + color: vars.$danger-color; + } +} \ No newline at end of file diff --git a/src/renderer/src/components/text-field/text-field.tsx b/src/renderer/src/components/text-field/text-field.tsx index 4f70cb16..08e9df63 100644 --- a/src/renderer/src/components/text-field/text-field.tsx +++ b/src/renderer/src/components/text-field/text-field.tsx @@ -1,7 +1,6 @@ import React, { useId, useMemo, useState } from "react"; import { EyeClosedIcon, EyeIcon } from "@primer/octicons-react"; import { useTranslation } from "react-i18next"; - import cn from "classnames"; import "./text-field.scss"; @@ -42,9 +41,7 @@ export const TextField = React.forwardRef( ) => { const id = useId(); const [isFocused, setIsFocused] = useState(false); - const [isPasswordVisible, setIsPasswordVisible] = useState(false); - const { t } = useTranslation("forms"); const showPasswordToggleButton = props.type === "password"; @@ -57,7 +54,7 @@ export const TextField = React.forwardRef( const hintContent = useMemo(() => { if (error && typeof error === "object" && "message" in error) return ( - + {error.message as string} ); @@ -82,24 +79,19 @@ export const TextField = React.forwardRef(
{label && } -
+
( {showPasswordToggleButton && (