File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
packages/bento-design-system/stories/Components Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 88 BentoConfigProvider ,
99 SelectFieldProps ,
1010 SelectOption ,
11+ Button ,
12+ Stack ,
1113} from ".." ;
1214import { useState } from "react" ;
1315
@@ -213,3 +215,22 @@ export const NotClearable = {
213215 ) ;
214216 } ,
215217} satisfies Story ;
218+
219+ // Story to test ghost click prevention on touch devices
220+ export const WithButtonBelow = {
221+ render : ( args ) => {
222+ const [ value , onChange ] = useState < number | undefined > ( undefined ) ;
223+ const [ clickCount , setClickCount ] = useState ( 0 ) ;
224+ return (
225+ < Stack space = { 16 } >
226+ < SelectField { ...args } value = { value } onChange = { ( v ) => onChange ( v as number ) } />
227+ < Button
228+ kind = "solid"
229+ hierarchy = "primary"
230+ label = { `Button clicked ${ clickCount } times` }
231+ onPress = { ( ) => setClickCount ( ( c ) => c + 1 ) }
232+ />
233+ </ Stack >
234+ ) ;
235+ } ,
236+ } satisfies Story ;
You can’t perform that action at this time.
0 commit comments