import express from 'express';
I will be updating this gist time and again.In this gist, i show how you how you can use gradients to improve your front end.
https://github.com/Bwogi/modals-in-action
The Person component has a gradient flowing from left to the right from white color to a grey shade.
className = 'bg-gradient-to-r from-white to-gray-500 ...'
- Create the modal component you wish to load
- Let the onClick event of your button point to a function, say paymentHandler
- Import this model to where you want to load it
- Import the useState hook
- Set it to false
- Destructure it to have paid variable and setPaid function
- In the paymentHandler function, set the setPaid function to true
- Below the button with this event, output a dynamic expression there where if paid variable is true, then load the modal component or if false, null.
const theme = useTheme();
const matches = useMediaQuery(theme.breakpoints.up('sm'));
// console.log(matches);
{matches ? <span style={{}}>Secure Social Media</span> : ''}
thanks to Adnan Niaz
NewerOlder