Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update styles for input and texarea with hovers #1993

Merged
merged 2 commits into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}`,
},
},
};