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

Fix the check box and input for mobile UI #26

Closed
wants to merge 3 commits into from
Closed
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
39 changes: 19 additions & 20 deletions src/components/PasswordGenerator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ const PasswordGenerator = () => {
},
];

const checkBoxOptions = [
{ label: 'uppercase', key: 'uppercase' },
{ label: 'lowercase', key: 'lowercase' },
{ label: 'numbers', key: 'numbers' },
{ label: 'specialChar', key: 'specialChar' }
];

// Character generators for each option
const generators = {
uppercase: () => {
Expand Down Expand Up @@ -157,26 +164,18 @@ const PasswordGenerator = () => {
onChange={(e) => setPasswordLength(e.target.value)}
/>
</div>
<CheckBoxWithLabel
label="uppercase"
isChecked={checkBox.uppercase}
handleCheckBoxClick={handleCheckBoxClick}
/>
<CheckBoxWithLabel
label="lowercase"
isChecked={checkBox.lowercase}
handleCheckBoxClick={handleCheckBoxClick}
/>
<CheckBoxWithLabel
label="numbers"
isChecked={checkBox.numbers}
handleCheckBoxClick={handleCheckBoxClick}
/>
<CheckBoxWithLabel
label="specialChar"
isChecked={checkBox.specialChar}
handleCheckBoxClick={handleCheckBoxClick}
/>
<div style={{display:"flex", flexDirection: "column"}}>

{checkBoxOptions.map(option => (
<CheckBoxWithLabel
key={option.key}
label={option.label}
isChecked={checkBox[option.key]}
handleCheckBoxClick={handleCheckBoxClick}
/>
))}

</div>
<div className="mt-4">
<label className="block text-gray-700 dark:text-white text-sm font-bold mb-2">
Exclude Characters:
Expand Down