Skip to content
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
20 changes: 12 additions & 8 deletions components/Account/ChangeFiatCurrency.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,26 @@ export default function ChangeFiatCurrency ({ preferredCurrencyId }: IProps): Re
}
}

return (<>
<div className={style.changeCurrency_ctn}>
return (
<>
<select
id='currency'
id="currency"
required
value={currency}
onChange={(e) => { void onChangeCurrency(e.target.value) }}
onChange={(e) => {
void onChangeCurrency(e.target.value)
}}
>
{SUPPORTED_QUOTES.map((currency: SupportedQuotesType) => (
<option key={currency} value={currency}>
{currency.toUpperCase()}
</option>
))}
</select>
</div>
{error !== '' && <span className={style.error_message}> {error} </span>}
{success !== '' && <span className={style.success_message}> {success} </span>}
</>)
{error !== '' && <span className={style.error_message}>{error}</span>}
{success !== '' && (
<span className={style.success_message}>{success}</span>
)}
</>
)
}
8 changes: 5 additions & 3 deletions components/Account/ChangePassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ChangePasswordPOSTParameters } from 'utils/validators'
import style from './account.module.css'

interface IProps {
toggleChangePassword: () => void;
toggleChangePassword: () => void
}

export default function ChangePassword ({ toggleChangePassword }: IProps): ReactElement {
Expand Down Expand Up @@ -91,9 +91,11 @@ export default function ChangePassword ({ toggleChangePassword }: IProps): React
<label htmlFor='newPasswordConfirmed'>Confirm new password</label>
<input {...register('newPasswordConfirmed')} type='password' id='newPasswordConfirmed' name='newPasswordConfirmed' required />
<div>
<div className={style.error_message}>
{error !== '' ? <span>{error}</span> : <span></span>}
{error !== ''
? <div className={style.error_message}>
{error}
</div>
: null}
<button disabled={disabled} className='button_main' type='submit'>Submit</button>
</div>
</form>
Expand Down
49 changes: 20 additions & 29 deletions components/Account/account.module.css
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
.success_message {
color: green;
font-size: 16px;
width: 100%;
height: 100%;
background-color: var(--secondary-bg-color);
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 10px;
}

.changepw_ctn {
width: 100%;
background-color: var(--secondary-bg-color);
max-width: 500px;
padding: 20px 25px;
margin: 4px 0;
border-radius: 10px;
position: relative;
margin-top: 20px;
}

.changepw_ctn form input {
Expand All @@ -37,19 +19,28 @@ body[data-theme='dark'] .changepw_ctn input {
border-radius: 10px;
}

.success_message,
.error_message {
background-color: #c5e7ba;
font-size: 14px;
width: 100%;
padding: 5px 10px;
border-radius: 5px;
text-align: center;
margin-top: 0px;
color: rgb(0, 99, 0);
display: inline-block;
font-weight: 400;
}

.error_message {
color: rgb(172, 0, 0);
background-color: #e7bfba;
}

@media (max-width: 960px) {
.changepw_ctn {
max-width: unset;
}
}

.error_message {
color: red;
font-size: 14px;
top: -20px;
left: 0;
background-color: rgba(255, 0, 0, 0.1);
padding: 1px 10px;
border-radius: 5px;
}

2 changes: 1 addition & 1 deletion components/Organization/organization.module.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.org_ctn {
width: 100%;
background-color: #fff;
max-width: 800px;
max-width: 700px;
padding: 20px;
border-radius: 10px;
}
Expand Down
19 changes: 15 additions & 4 deletions components/Timezone Selector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,29 @@ const TimezoneSelector: React.FC<TimezoneSelectorProps> = ({ value }) => {
void updateTimezone()
}

const customStyles = {
option: (provided, state) => ({
...provided,
backgroundColor: state.isFocused === true ? '#669cfe' : '',
':hover': {
backgroundColor: '#669cfe'
}
})
}

return (
<div className={style.timezone_selector}>
<>
<Select
value={selectedTimezone}
onChange={handleChange}
disabled={false}
className={style.select_timezone}
displayValue="UTC"
styles={customStyles}
/>
{error !== '' && <span className={style.error_message}> {error} </span>}
{success !== '' && <span className={style.success_message}> {success} </span>}
</div>
{error !== '' && <span className={style.error_message}>{error}</span>}
{success !== '' && <span className={style.success_message}>{success}</span>}
</>
)
}

Expand Down
53 changes: 24 additions & 29 deletions components/Timezone Selector/timezone-selector.module.css
Original file line number Diff line number Diff line change
@@ -1,40 +1,35 @@
.timezone_selector {
display: flex;
flex-direction: column;
gap: 10px;
margin: 15px 0;
padding: 10px;
border: 1px solid var(--secondary-bg-color);
border-radius: 5px;
background-color: var(--secondary-bg-color);
}

.select_timezone {
margin-top: 10px;
}

.select_timezone > div {
background-color: var(--secondary-bg-color) !important;
color: black;
font-family: 'Poppins', sans-serif;
border: 1px solid var(--secondary-text-color) !important;
}

.success_message {
color: green;
font-size: 16px;
width: 100%;
height: 100%;
background-color: var(--secondary-bg-color);
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 10px;
body[data-theme='dark'] .select_timezone > div {
background-color: var(--primary-bg-color) !important;
border-color: #585858 !important;
}

.select_timezone div {
color: var(--primary-text-color) !important;
}

.success_message,
.error_message {
color: red;
background-color: #c5e7ba;
font-size: 14px;
top: -20px;
left: 0;
background-color: rgba(255, 0, 0, 0.1);
padding: 1px 10px;
width: 100%;
padding: 5px 10px;
border-radius: 5px;
text-align: center;
margin-top: 10px;
color: rgb(0, 99, 0);
}

.error_message {
color: rgb(172, 0, 0);
background-color: #e7bfba;
}
Loading
Loading