How to remove margin and padding from html/body in storybook doc iframe
Create a file named preview-body.html in .storybook/ folder
// Using a model as a type | |
const taco = 'taco'; | |
type TacoType = typeof taco; | |
// type TacoType = 'taco' | |
let bell = 'bell'; | |
type BellType = typeof bell; | |
// type BellType = string |
How to remove margin and padding from html/body in storybook doc iframe
Create a file named preview-body.html in .storybook/ folder
import { useMemo, useState } from "react" | |
type TController = { | |
} | |
export const useController = () => { | |
const [data, setData] = useState({} as TController); | |
const [] = useMemo(() => { |
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import styled from "styled-components"; | |
const { useState } = React; | |
const App = () => { | |
const [select, setSelect] = useState("optionA"); | |
const handleSelectChange = event => { |
{ | |
breakpoints: { | |
} | |
} |
// methood 1 | |
function getFileExtension(filename:string) { | |
return filename.slice((filename.lastIndexOf(".") - 1 >>> 0) + 2); | |
} | |
// method 2 | |
function getFileExtension(filename:string) { | |
filename.substring(filename.lastIndexOf('.')+1); | |
} |
S0metimes, you start your wordpress website in your localhost. All posts and url's are created with your url. When deploying your application, the url must be updated to the new host.
This queries update the wordpress url to a new url.
// Firestore data from a Cloud Function | |
const functions = require('firebase-functions'); | |
const admin = require('firebase-admin'); | |
admin.initializeApp(); | |
const db = admin.firestore(); | |
exports.getData = functions.https.onRequest((req, res) => { | |
const docRef = db.collection('my-collection').doc('doc-id'); | |
const getDoc = docRef.get() |
@mixin mobile { | |
@media (max-width: 425px){ | |
@content; | |
} | |
} | |
@use 'mixins'; | |
p { | |
font-size: 35px; |