File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
code/addons/pseudo-states/src/stories Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 11import React , { type ComponentProps } from 'react' ;
22
33import type { Meta , StoryObj } from '@storybook/react-vite' ;
4+ import { styled } from 'storybook/theming' ;
45
56import { Button } from './Button' ;
67import './grid.css' ;
@@ -54,6 +55,23 @@ export const Hover: Story = {
5455 } ,
5556} ;
5657
58+ const StyledButton = styled ( Button ) `
59+ &:hover {
60+ @media (hover: hover) {
61+ background-color: limegreen !important;
62+ }
63+ }
64+ ` ;
65+
66+ export const HoverMediaQuery : Story = {
67+ parameters : {
68+ pseudo : { hover : true } ,
69+ } ,
70+ render : ( args ) => {
71+ return < StyledButton { ...args } > Hover (hover: hover)</ StyledButton > ;
72+ } ,
73+ } ;
74+
5775export const Focus : Story = {
5876 parameters : {
5977 pseudo : { focus : true } ,
You can’t perform that action at this time.
0 commit comments