Skip to content

Commit 95141ea

Browse files
Merge pull request #268 from commitd/sh/minor
Minor fixes found in using version 7
2 parents 12a4fe2 + ae7e352 commit 95141ea

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Install Dependencies
3030
run: |
3131
npm install
32-
- name: Run lint
32+
- name: Run build
3333
run: |
3434
npm run build
3535
- name: Upload build artifacts

src/components/FormControl/FormControl.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import React, {
66
useRef,
77
useState,
88
} from 'react'
9-
import { styled } from '../../stitches.config'
9+
import { CSSProps, styled } from '../../stitches.config'
1010
import { Text } from '../Text'
1111
import {
1212
DEFAULT_FORM_STATE,
@@ -21,11 +21,11 @@ const Root = styled(DEFAULT_TAG, {
2121
boxSizing: 'border-box',
2222
outline: 'none',
2323

24-
display: 'inline-flex',
24+
display: 'flex',
2525
flexDirection: 'column',
2626
})
2727

28-
type FormControlProps = {
28+
type FormControlProps = CSSProps & {
2929
children: React.ReactNode
3030
}
3131

src/components/Input/Input.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ const StyledInput = styled(
1818

1919
type InputVariants = Omit<VariantProps<typeof StyledInput>, 'state'>
2020

21-
type InputProps = ComponentProps<typeof StyledInput> &
21+
// Required due to ts error forcing the enterKeyHint props. Likely can be removed in later version.
22+
type StyledInputProps = Omit<ComponentProps<typeof StyledInput>, 'enterKeyHint'>
23+
24+
type InputProps = StyledInputProps &
2225
UseFormControlProps &
2326
InputVariants & {
2427
/** Add a label to the Input */
@@ -27,6 +30,16 @@ type InputProps = ComponentProps<typeof StyledInput> &
2730
required?: boolean
2831
/** Called on input change with new value */
2932
onValueChange?: (value: string) => void
33+
/* Added directly to correct ts error */
34+
enterKeyHint?:
35+
| 'enter'
36+
| 'done'
37+
| 'go'
38+
| 'next'
39+
| 'previous'
40+
| 'search'
41+
| 'send'
42+
| undefined
3043
} & CSSProps
3144

3245
export const Input = forwardRef<ElementRef<typeof DEFAULT_TAG>, InputProps>(

0 commit comments

Comments
 (0)