logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/

tab.style.js (1530B)


  1. export default {
  2. name: 'Tab', // Name of the component
  3. selector: '.tab', // CSS selector/prefix
  4. states: {
  5. active: '.active',
  6. hover: ':hover:not(.disabled)',
  7. disabled: '.disabled'
  8. },
  9. validInnerComponents: [
  10. 'Text',
  11. 'Icon'
  12. ],
  13. defaultRules: [
  14. {
  15. directives: {
  16. background: '--fg',
  17. shadow: ['--defaultButtonShadow', '--defaultButtonBevel'],
  18. roundness: 3
  19. }
  20. },
  21. {
  22. state: ['hover'],
  23. directives: {
  24. shadow: ['--defaultButtonHoverGlow', '--defaultButtonBevel']
  25. }
  26. },
  27. {
  28. state: ['active'],
  29. directives: {
  30. opacity: 0
  31. }
  32. },
  33. {
  34. state: ['hover', 'active'],
  35. directives: {
  36. shadow: ['--defaultButtonShadow', '--defaultButtonBevel']
  37. }
  38. },
  39. {
  40. state: ['disabled'],
  41. directives: {
  42. background: '$blend(--inheritedBackground, 0.25, --parent)',
  43. shadow: ['--defaultButtonBevel']
  44. }
  45. },
  46. {
  47. component: 'Text',
  48. parent: {
  49. component: 'Tab',
  50. state: ['disabled']
  51. },
  52. directives: {
  53. textOpacity: 0.25,
  54. textOpacityMode: 'blend'
  55. }
  56. },
  57. {
  58. component: 'Icon',
  59. parent: {
  60. component: 'Tab',
  61. state: ['active']
  62. },
  63. directives: {
  64. textColor: '--text'
  65. }
  66. },
  67. {
  68. component: 'Icon',
  69. parent: {
  70. component: 'Tab',
  71. state: ['active', 'hover']
  72. },
  73. directives: {
  74. textColor: '--text'
  75. }
  76. }
  77. ]
  78. }