aboutsummaryrefslogtreecommitdiff
path: root/src/components/input.style.js
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2024-10-03 19:44:24 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2024-10-03 19:44:24 +0000
commita1c3a7a742ea86b0ddeb67a42ca27f478f0f22a2 (patch)
tree82540411b3afbcc66545e2419eee7ec5dbae7f93 /src/components/input.style.js
parent56a3bff267203017a704652117167569be0cd58a (diff)
parent05ab57a8e68033b520e6038afaa6514423f0d117 (diff)
Merge branch 'shadow-control-2.0' into 'develop'
Fixed and refined the shadow control in theme tab See merge request pleroma/pleroma-fe!1939
Diffstat (limited to 'src/components/input.style.js')
-rw-r--r--src/components/input.style.js43
1 files changed, 36 insertions, 7 deletions
diff --git a/src/components/input.style.js b/src/components/input.style.js
index 7302cd6d..6ad6cf90 100644
--- a/src/components/input.style.js
+++ b/src/components/input.style.js
@@ -10,17 +10,18 @@ const hoverGlow = {
export default {
name: 'Input',
selector: '.input',
- variant: {
+ states: {
+ hover: ':hover:not(.disabled)',
+ focused: ':focus-within',
+ disabled: '.disabled'
+ },
+ variants: {
checkbox: '.-checkbox',
radio: '.-radio'
},
- states: {
- disabled: ':disabled',
- hover: ':hover:not(:disabled)',
- focused: ':focus-within'
- },
validInnerComponents: [
- 'Text'
+ 'Text',
+ 'Icon'
],
defaultRules: [
{
@@ -55,6 +56,34 @@ export default {
directives: {
shadow: [hoverGlow, '--defaultInputBevel']
}
+ },
+ {
+ state: ['disabled'],
+ directives: {
+ background: '--parent'
+ }
+ },
+ {
+ component: 'Text',
+ parent: {
+ component: 'Input',
+ state: ['disabled']
+ },
+ directives: {
+ textOpacity: 0.25,
+ textOpacityMode: 'blend'
+ }
+ },
+ {
+ component: 'Icon',
+ parent: {
+ component: 'Input',
+ state: ['disabled']
+ },
+ directives: {
+ textOpacity: 0.25,
+ textOpacityMode: 'blend'
+ }
}
]
}