Skip to content

Commit

Permalink
feat: Update styles for input and texarea with hovers (#1993)
Browse files Browse the repository at this point in the history
* feat: Update styles for input and texarea with hovers

* Create tasty-crews-play.md
  • Loading branch information
sebald authored Apr 14, 2022
1 parent 59f3e6f commit 4d22086
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 21 deletions.
6 changes: 6 additions & 0 deletions .changeset/tasty-crews-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@marigold/theme-b2b": patch
"@marigold/theme-unicorn": patch
---

feat: Update styles for input and texarea with hovers
4 changes: 4 additions & 0 deletions themes/theme-b2b/src/components/Input.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export const Input: Theme['components']['Input'] = {
py: 'none',
px: 'xsmall',

'&:hover': {
borderColor: 'gray50',
},

'&:focus': {
borderColor: 'blue60',
boxShadow: `0 0 0 1px ${colors.blue60}`,
Expand Down
34 changes: 22 additions & 12 deletions themes/theme-b2b/src/components/TextArea.style.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
import { Theme } from '@marigold/components';
import { colors } from '../colors';

export const TextArea: Theme['components']['TextArea'] = {
base: {
fontFamily: 'body',
lineHeight: 'medium',
py: 'xxsmall',
px: 'xsmall',
color: 'text',
border: 'none',
lineHeight: 'large',

border: '1px solid',
borderColor: 'gray40',
borderRadius: 'small',
outline: '1px solid',
outlineColor: 'disabled',
outline: 'none',

py: 'none',
px: 'xsmall',

'&:hover': {
borderColor: 'gray50',
},

'&:focus': {
outline: '2px solid',
outlineColor: 'blue60',
borderColor: 'blue60',
boxShadow: `0 0 0 1px ${colors.blue60}`,
},

'&:disabled': {
cursor: 'not-allowed',
color: 'disabled',
bg: 'gray20',
color: 'gray40',
cursor: 'not-allowed',
},

'&:error': {
color: 'red60',
borderColor: 'red60',
boxShadow: `0 0 0 1px ${colors.red60}`,
},
},
};
4 changes: 4 additions & 0 deletions themes/theme-unicorn/src/components/Input.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export const Input: Theme['components']['Input'] = {
py: 'none',
px: 'xsmall',

'&:hover': {
borderColor: 'purple40',
},

'&:focus': {
borderColor: 'purple60',
boxShadow: `0 0 0 1px ${colors.purple60}`,
Expand Down
31 changes: 22 additions & 9 deletions themes/theme-unicorn/src/components/TextArea.style.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,37 @@
import { Theme } from '@marigold/components';
import { colors } from '../colors';

export const TextArea: Theme['components']['TextArea'] = {
base: {
fontFamily: 'body',
lineHeight: 'medium',
padding: '4px 8px',
color: 'text',
border: 0,
borderRadius: '8px',
outline: '2px solid',
lineHeight: 'large',

border: '1px solid',
borderColor: 'gray40',
borderRadius: 'small',
outline: 'none',

py: 'none',
px: 'xsmall',

'&:hover': {
borderColor: 'purple40',
},

'&:focus': {
outline: '4px solid',
outlineColor: 'primary',
borderColor: 'purple60',
boxShadow: `0 0 0 1px ${colors.purple60}`,
},

'&:disabled': {
bg: 'gray20',
color: 'gray40',
cursor: 'not-allowed',
},

'&:error': {
color: 'red60',
borderColor: 'red60',
boxShadow: `0 0 0 1px ${colors.red60}`,
},
},
};

0 comments on commit 4d22086

Please sign in to comment.