Skip to content

Commit ce14be8

Browse files
committed
fix: Disabled state when hovering
1 parent 2e125e6 commit ce14be8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/atoms/input.stories.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react'
22
import { withKnobs, boolean, number, select } from '../../storybook/node_modules/@storybook/addon-knobs'
3-
import { Text, Input, Label, Button, Box } from '..'
3+
import { FormGroup, Text, Input, Label, Button, Box } from '..'
44
import StoryWrapper from '../utils/story-wrapper'
55

66
export default { title: 'DesignSystem/Atoms/Input', decorators: [withKnobs] }
@@ -9,6 +9,7 @@ const inputTypes = ['email', 'file', 'hidden', 'month', 'number', 'tel', 'text',
99

1010
export const Default: React.FC = () => {
1111
const borderless = boolean('borderless', false)
12+
const disabled = boolean('disabled', false)
1213
const variant = select('variant', ['sm', 'lg', 'xl', 'default'], 'default')
1314
const type = select('type', inputTypes, 'text')
1415
const width = number('width', 1 / 2, {
@@ -20,15 +21,16 @@ export const Default: React.FC = () => {
2021
return (
2122
<Box width={1}>
2223
<StoryWrapper label="Knobs example">
23-
<form>
24+
<FormGroup>
2425
<Input
2526
width={width}
2627
type={type}
2728
variant={variant}
2829
borderless={borderless}
30+
disabled={disabled}
2931
/>
3032
<Button type="submit">Submit</Button>
31-
</form>
33+
</FormGroup>
3234
</StoryWrapper>
3335
</Box>
3436
)

src/molecules/form-group/form-group.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,6 @@ const FormGroup = styled.div<FormGroupProps>`
145145
& ${Input} {
146146
${({ variant, theme }): string => (variant === 'filter' ? `border-color: ${theme.colors.filterInputBorder}` : '')};
147147
${({ variant, theme }): string => (variant === 'filter' ? `color: ${theme.colors.white}` : '')};
148-
&:hover {
149-
border-color: ${({ variant, theme }): string => (variant === 'filter' ? theme.colors.grey60 : theme.colors.grey60)};
150-
}
151148
}
152149
153150
& ${InputGroup} {

0 commit comments

Comments
 (0)