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 animationData from "./loading.json"; | |
import placeholderImg from "./preview.png"; | |
import { Player } from "@lottiefiles/react-lottie-player"; | |
const App = () => { | |
return ( | |
<div className="App"> | |
{!animationData ? ( | |
<img src={placeholderImg} alt="Loading placeholder" /> | |
) : ( |
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 animationData from "./loading.json"; | |
import { Player } from "@lottiefiles/react-lottie-player"; | |
const App = () => { | |
return ( | |
<div className="App"> | |
<Player | |
autoplay | |
loop | |
src={animationData} |
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
.fullWidthSection { | |
/* Hack to make the section full viewport width */ | |
width: 100vw; | |
margin-left: calc( | |
-50vw + 50% | |
); /* Adjusts the section to align left edge with the viewport */ | |
margin-right: calc( | |
-50vw + 50% | |
); /* Adjusts the section to align right edge with the viewport */ |
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
// from https://kelvinzhang.com/playground/scroll-area | |
import { CSSProperties, useCallback, useEffect, useRef, useState } from "react"; | |
import styled from 'styled-components'; | |
type ScrollAreaProps = { | |
children: React.ReactNode; | |
showOverflowIndicator?: boolean; | |
hideScrollbar?: boolean; | |
indicatorColor?: CSSProperties["background"]; |