mirror of
https://github.com/towfiqi/serpbear
synced 2025-06-26 18:15:54 +00:00
- Integrates Google Adwords API to generate keywords for a domain. - Adds a New Adwords Integration ui inside the App settings > Integrations screen to integrate Google Adwords. - Adds a New Ideas tab under each domain. - Adds ability to automatically generate keyword ideas based on website content, currently tracked keywords, Currently Ranking keywords or custom keywords - The Keyword Ideas are not saved in database, they are saved in a local file inside the data folder. File naming convention: IDEAS_domain.com.json - The keywords can be marked as favorites, and each time a keyword is favorited, they are added in the IDEAS_domain.com.json file.
38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
import { useState } from 'react';
|
|
import Icon from './Icon';
|
|
|
|
type SecretFieldProps = {
|
|
label: string;
|
|
value: string;
|
|
onChange: Function;
|
|
placeholder?: string;
|
|
classNames?: string;
|
|
hasError?: boolean;
|
|
}
|
|
|
|
const SecretField = ({ label = '', value = '', placeholder = '', onChange, hasError = false }: SecretFieldProps) => {
|
|
const [showValue, setShowValue] = useState(false);
|
|
const labelStyle = 'mb-2 font-semibold inline-block text-sm text-gray-700 capitalize';
|
|
return (
|
|
<div className="settings__section__secret w-full relative flex justify-between items-center">
|
|
<label className={labelStyle}>{label}</label>
|
|
<span
|
|
className="absolute top-1 right-0 px-2 py-1 cursor-pointer text-gray-400 select-none"
|
|
onClick={() => setShowValue(!showValue)}>
|
|
<Icon type={showValue ? 'eye-closed' : 'eye'} size={18} />
|
|
</span>
|
|
<input
|
|
className={`w-[210px] p-2 border border-gray-200 rounded focus:outline-none
|
|
focus:border-blue-200 ${hasError ? ' border-red-400 focus:border-red-400' : ''} `}
|
|
type={showValue ? 'text' : 'password'}
|
|
value={value}
|
|
onChange={(event) => onChange(event.target.value)}
|
|
autoComplete="off"
|
|
placeholder={placeholder}
|
|
/>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default SecretField;
|