|
1 | 1 | import { |
| 2 | + useGlassHighlightEffect, |
2 | 3 | useGlowEffect, |
3 | 4 | useGradientBorderEffect, |
4 | 5 | useNoiseEffect, |
@@ -45,6 +46,10 @@ function useGlowStoryHook(options: DemoOptions): RefCallback<HTMLElement> { |
45 | 46 | return useGlowEffect(options); |
46 | 47 | } |
47 | 48 |
|
| 49 | +function useGlassHighlightStoryHook(options: DemoOptions): RefCallback<HTMLElement> { |
| 50 | + return useGlassHighlightEffect(options); |
| 51 | +} |
| 52 | + |
48 | 53 | function useNoiseStoryHook(options: DemoOptions): RefCallback<HTMLElement> { |
49 | 54 | return useNoiseEffect(options); |
50 | 55 | } |
@@ -104,6 +109,45 @@ const STORIES: EffectStory[] = [ |
104 | 109 | { key: 'disabled', label: 'Disabled', type: 'checkbox' }, |
105 | 110 | ], |
106 | 111 | }, |
| 112 | + { |
| 113 | + id: 'glass-highlight', |
| 114 | + title: 'Glass Highlight', |
| 115 | + description: 'Glassy edge light and sheen overlay for premium surfaces.', |
| 116 | + hookName: 'useGlassHighlightEffect', |
| 117 | + componentName: 'GlassHighlightCard', |
| 118 | + previewText: 'Glass Highlight Surface', |
| 119 | + previewElement: 'article', |
| 120 | + previewStyle: { |
| 121 | + background: |
| 122 | + 'linear-gradient(145deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.92) 52%, rgba(15, 23, 42, 0.98) 100%)', |
| 123 | + color: '#e2e8f0', |
| 124 | + border: '1px solid rgba(148, 163, 184, 0.22)', |
| 125 | + boxShadow: |
| 126 | + '0 18px 48px rgba(15, 23, 42, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04)', |
| 127 | + } as CSSProperties, |
| 128 | + hook: useGlassHighlightStoryHook, |
| 129 | + defaults: { |
| 130 | + color: '#a855f7', |
| 131 | + edgeOpacity: 0.3, |
| 132 | + sheenOpacity: 0.44, |
| 133 | + tintOpacity: 0.56, |
| 134 | + angle: '132deg', |
| 135 | + blur: 0, |
| 136 | + inset: 0, |
| 137 | + saturate: 1.85, |
| 138 | + }, |
| 139 | + controls: [ |
| 140 | + { key: 'color', label: 'Color', type: 'color' }, |
| 141 | + { key: 'edgeOpacity', label: 'Edge opacity', type: 'range', min: 0, max: 1, step: 0.01 }, |
| 142 | + { key: 'sheenOpacity', label: 'Sheen opacity', type: 'range', min: 0, max: 1, step: 0.01 }, |
| 143 | + { key: 'tintOpacity', label: 'Tint opacity', type: 'range', min: 0, max: 1, step: 0.01 }, |
| 144 | + { key: 'angle', label: 'Angle', type: 'text' }, |
| 145 | + { key: 'blur', label: 'Blur', type: 'number', min: 0, max: 40, step: 1 }, |
| 146 | + { key: 'inset', label: 'Inset', type: 'number', min: -8, max: 24, step: 1 }, |
| 147 | + { key: 'saturate', label: 'Saturate', type: 'range', min: 0, max: 2, step: 0.01 }, |
| 148 | + { key: 'disabled', label: 'Disabled', type: 'checkbox' }, |
| 149 | + ], |
| 150 | + }, |
107 | 151 | { |
108 | 152 | id: 'noise', |
109 | 153 | title: 'Noise', |
@@ -299,7 +343,7 @@ function EffectPlayground({ story }: { story: EffectStory }) { |
299 | 343 | </header> |
300 | 344 | <div className="demo-preview"> |
301 | 345 | <PreviewTag ref={ref} className={previewClassName} style={story.previewStyle}> |
302 | | - {story.previewText} |
| 346 | + <span className="demo-card-content">{story.previewText}</span> |
303 | 347 | </PreviewTag> |
304 | 348 | </div> |
305 | 349 | </div> |
|
0 commit comments