// Button.js => Button.css
import { chakra } from "@chakra-ui/magic";
import "@chakra-ui/css/Button.css";
<chakra.button mb="2" mt="2" _hover={{ bg: "red.200", _focus: {} }} />;
<button css={{mb: "2", mt="2", _hover: { bg: "red.200", _focus: {} }} />
const result = interpret(
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
// example vite.config.js | |
import { cdn } from './vite-plugin-cdn' | |
export default { | |
plugins: [ | |
// also supported: esm.run, jspm | |
// loads the dep over the CDN during dev | |
// auto downloads and includes into the bundle during build | |
cdn('skypack', { | |
vue: '^3.0.5' |
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
/* App.svelte generated by Svelte v3.14.1 */ | |
/* After terser compression: min:6.00kb / gzip:2.43kb / brotli:2.15kb */ | |
const { | |
SvelteComponent, | |
append, | |
attr, | |
destroy_block, | |
detach, | |
element, | |
empty, |
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
/* Basic example of saving cookie using axios in node.js and session's recreation after expiration. | |
* We have to getting/saving cookie manually because WithCredential axios param use XHR and doesn't work in node.js | |
* Also, this example supports parallel request and send only one create session request. | |
* */ | |
const BASE_URL = "https://google.com"; | |
// Init instance of axios which works with BASE_URL | |
const axiosInstance = axios.create({ baseURL: BASE_URL }); |
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
const captureWebRTCAudio = (successHandler) => { | |
return navigator.mediaDevices.getUserMedia({audio: true, video: false}).then(successHandler); | |
}; | |
export default captureWebRTCAudio; |
From: StackOverflow
document.getElementById("MyElement").className = "MyClass";
document.getElementById("MyElement").className += " MyClass";