Skip to content

Commit

Permalink
Fix DOB input colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Puyodead1 committed Sep 3, 2023
1 parent 64394e7 commit c764bab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/components/DOBInput.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
position: relative;
display: block;
padding: 10px;
background: var(--background-secondary);
background: var(--background-secondary-alt);
border: none;
color: var(--text);
outline: none;
Expand Down Expand Up @@ -92,7 +92,7 @@
.select-search-is-selected {
font-weight: bold;
color: var(--text);
background-color: hsl(20, 4%, 25%);
background-color: var(--background-primary-alt);
}

.select-search-row:not(:first-child) .select-search-group-header {
Expand Down
17 changes: 4 additions & 13 deletions src/components/DOBInput.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { Component } from "react";
import SelectSearch from "react-select-search";
import styled from "styled-components";
import { Input } from "./AuthComponents";
import "./DOBInput.css";

// const MIN_AGE = 13;
Expand All @@ -11,17 +12,7 @@ const Container = styled.div`
display: flex;
`;

const Input = styled.input<{ error?: boolean }>`
outline: none;
background: var(--background-secondary);
padding: 10px;
font-size: 16px;
border-radius: 12px;
color: var(--text);
margin: 0 0 0 5px;
border: none;
aria-invalid: ${(props) => (props.error ? "true" : "false")};
border: ${(props) => (props.error ? "1px solid red" : "none")};
const CustomInput = styled(Input)`
box-sizing: border-box;
width: 100%;
`;
Expand Down Expand Up @@ -198,15 +189,15 @@ export class DOBInput extends Component<Props, State> {
value={this.state.month}
disabled={this.props.disabled}
/>
<Input
<CustomInput
placeholder="Day"
onChange={this.onInputChange("day")}
value={this.state.day}
error={this.state.errors.day || this.props.error}
maxLength={2}
disabled={this.props.disabled}
/>
<Input
<CustomInput
placeholder="Year"
onChange={this.onInputChange("year")}
value={this.state.year}
Expand Down

0 comments on commit c764bab

Please sign in to comment.