This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from "axios"; | |
import React from "react"; | |
import { Button, Col, Container, Form, FormGroup, FormLabel, Row } from "react-bootstrap"; | |
import { useNavigate } from "react-router-dom"; | |
const Login = () => { | |
const submitLoginForm = (event) => { | |
event.preventDefault(); | |
} | |
return ( | |
<React.Fragment> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from "axios"; | |
import React from "react"; | |
import { Button, Col, Container, Form, FormGroup, FormLabel, Row } from "react-bootstrap"; | |
import { useNavigate } from "react-router-dom"; | |
const Login = () => { | |
const submitLoginForm = (event) => { | |
event.preventDefault(); | |
} | |
return ( | |
<React.Fragment> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#radio-cards-container { | |
margin-top: 5rem; | |
width: 75vw; | |
display: flex; | |
flex-wrap: wrap; | |
justify-content: center; | |
} | |
.radio-card { | |
border: 2px solid rgba(0, 0, 0, 0.1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const selectRadioCard = (cardNo) => { | |
/** | |
* Loop through all radio cards, and remove the class "selected" from those elements. | |
*/ | |
const allRadioCards = document.querySelectorAll(".radio-card"); | |
allRadioCards.forEach((element, index) => { | |
element.classList.remove(["selected"]); | |
}); | |
/** | |
* Add the class "selected" to the card which user has clicked on. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<h1>Create Stunning Radio Cards Using HTML, CSS, and JavaScript</h1> | |
<div id="radio-cards-container"> | |
<!-- Radio Card 1 --> | |
<div class="radio-card radio-card-1" onclick="selectRadioCard('1')"> | |
<!-- Radio Card Check (tick) icon. By default, its hidden. Will be displayed when card gets clicked. --> | |
<div class="radio-card-check"> | |
<i class="fa-solid fa-check-circle"></i> | |
</div> | |
<!-- Section to display the icon, label, and some additional text --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Spinner from 'react-bootstrap/Spinner'; | |
const SpinnerDemo = () => { | |
return ( | |
<React.Fragment> | |
<div className='mb-4'> | |
<Spinner animation="border" variant="primary" /> | |
<Spinner animation="border" variant="secondary" className='ms-3' /> | |
<Spinner animation="border" variant="success" className='ms-3' /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import Alert from "react-bootstrap/Alert"; | |
const AlertDemo = () => { | |
return ( | |
<React.Fragment> | |
{[ | |
'primary', | |
'secondary', | |
'success', |