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
/** | |
* Adapted from [deanmcpherson](https://github.com/tailwindlabs/tailwindcss/discussions/1611#discussioncomment-1959522). | |
* Scales all rem values for the given theme object. | |
* @param {Object} theme - The theme object containing the values to be scaled. | |
* @param {number} from - The original value to scale from. | |
* @param {number} to - The target value to scale to. | |
* @returns {Object} - The modified theme object with scaled rem values. | |
* | |
* @example | |
* const defaultTheme = require('tailwindcss/defaultTheme'); |
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
module Toaster = { | |
@react.component @module("react-hot-toast") | |
external make: ( | |
~position: option<string>=?, | |
~reverseOrder: option<bool>=?, | |
~gutter: option<int>=?, | |
~containerClassName: option<string>=?, | |
~containerStyle: option<ReactDOMRe.Style.t>=?, | |
~toastOptions: option<{..}>=?, | |
) => React.element = "Toaster" |
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
module RequiredField = { | |
@decco | |
type t = {value: string} | |
} | |
module RequiredFieldWithDefault = { | |
@decco | |
type t = { | |
@decco.default("fallback") | |
value: string, |
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
<!-- https://play.tailwindcss.com/D6b5GejsrZ --> | |
<div class="aspect-[16/9] p-12"> | |
<img | |
class="h-full w-full border-2 border-black object-cover" | |
alt="image placeholder" | |
src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO89x8AAsEB3+IGkhwAAAAASUVORK5CYII=" | |
/> | |
</div> |
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
open Belt | |
@get | |
external getClientHeight: Dom.element => int = "clientHeight" | |
let useClientHeight = () => { | |
let ref: React.ref<Js.Nullable.t<Dom.element>> = React.useRef(Js.Nullable.null) | |
(ref, ref.current->Js.Nullable.toOption->Option.map(el => el->getClientHeight)) | |
} |
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
.content { | |
h1, | |
.h1, | |
h2, | |
.h2, | |
h3, | |
.h3, | |
h4, | |
.h4, | |
h5, |
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
<h1>HyperText Markup Language</h1> | |
<p>The HyperText Markup Language, or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScript.</p> | |
<h2>History</h2> | |
<h3>Development</h3> | |
<img class="alignleft" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/Tim_Berners-Lee_April_2009.jpg/340px-Tim_Berners-Lee_April_2009.jpg" /> | |
<p>In 1980, physicist Tim Berners-Lee, a contractor at CERN, proposed and prototyped ENQUIRE, a system for CERN researchers to use and share documents. In 1989, Berners-Lee wrote a memo proposing an Internet-based hypertext system.[3] Berners-Lee specified HTML and wrote the browser and server software in late 1990. That year, Berners-Lee and CERN data systems engineer Robert Cailliau collaborated on a joint request for funding, but the project was not formally adopted by CERN. In his personal notes[4] from 1990 he listed[5] "some of t |
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
open! Utils; | |
type t('a) = | |
Js.Promise.t( | |
Belt.Result.t( | |
ApolloClient__React_Types.FetchResult.t__ok('a), | |
ApolloClient__ApolloClient.ApolloError.t, | |
), | |
); |
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
# /bin/bash | |
npm outdated \ | |
| tail --lines=+2 \ | |
| awk '{print $1"@latest"}' \ | |
| xargs -d '\n' npm install |
NewerOlder