Touchablecomponent
component
A wrapper component that makes any child element clickable with a custom handler. You can view the Storybook for more interactive examples.
Was this section helpful?
Touchable
import {Touchable} from '@shopify/shop-minis-react'
export default function MyComponent() {
const handleClick = () => {
console.log('Touchable clicked')
}
return (
<Touchable onClick={handleClick}>
<div>Continue</div>
</Touchable>
)
}
examples
Touchable
import {Touchable} from '@shopify/shop-minis-react' export default function MyComponent() { const handleClick = () => { console.log('Touchable clicked') } return ( <Touchable onClick={handleClick}> <div>Continue</div> </Touchable> ) }