A Pen by Vihanga nivarthana on CodePen.
This file contains 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
/* overriding theme class to align icons properly */ | |
a.sf-sub-menu__link { | |
display: flex; | |
gap:1rem; | |
align-items: center; | |
} | |
/* icon styles */ |
This file contains 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
@font-face { | |
font-family: "duotone"; | |
src: url("duotone-Regular.ttf") format("truetype"), | |
url("duotone-Regular.woff") format("woff"); | |
font-weight: normal; | |
font-style: normal; | |
font-display: block; | |
} | |
[class^="icon-"], |
This file contains 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, { useState } from "react"; | |
export default function App() { | |
let [isOn, setOn] = useState(false); | |
const toggle = (e) => { | |
if (e.target.checked) { | |
setOn(true); | |
} else { | |
setOn(false); |
This file contains 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
.slider{ | |
position: relative; | |
width:100px; | |
height: 50px; | |
display: inline-block; | |
cursor: pointer; | |
margin:0px 10px 0px 10px; | |
transform: scale(0.7); | |
} |
This file contains 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
<label className="slider" > | |
<input type="checkbox"/> | |
<div className="sort"></div> | |
</label> |