Skip to content

Commit

Permalink
Fix height of the DateInput component (#1942)
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer authored Feb 9, 2023
1 parent fbaa82b commit fd62d2f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/stale-lemons-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sumup/circuit-ui': patch
---

Fixed the height of the `DateInput` component.
7 changes: 4 additions & 3 deletions packages/circuit-ui/components/DateInput/DateInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
*/

import { forwardRef, useState, useEffect } from 'react';
import { css } from '@emotion/react';
import { PatternFormat } from 'react-number-format';

import styled from '../../styles/styled';
import { Input, InputProps } from '../Input/Input';

export interface DateInputProps
Expand All @@ -34,7 +34,7 @@ export interface DateInputProps
defaultValue?: string | number;
}

const BaseInput = styled(Input)`
const dateInputStyles = css`
height: 48px;
min-width: 8ch;
`;
Expand Down Expand Up @@ -81,9 +81,10 @@ export const DateInput = forwardRef(
}

return (
<BaseInput
<Input
{...props}
ref={ref}
inputStyles={dateInputStyles}
type="date"
pattern="\d{4}-\d{2}-\d{2}"
placeholder={placeholder}
Expand Down

1 comment on commit fd62d2f

@vercel
Copy link

@vercel vercel bot commented on fd62d2f Feb 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.