Skip to content

Instantly share code, notes, and snippets.

View hsnmrd's full-sized avatar
✌️
upgrading

hassan moradnezhad hsnmrd

✌️
upgrading
View GitHub Profile
@hsnmrd
hsnmrd / Select.tsx
Created October 31, 2023 09:26
kit-update
import React, {ReactNode, useCallback, useEffect, useRef, useState} from "react";
import {Div} from "@kit/component/div";
import {Popup} from "@kit/component/popup";
import {Card} from "@kit/component";
import {BreakpointProp} from "@kit/utils";
import {Property} from "csstype";
export interface SelectProps<TYPE> {
$holder: (current: TYPE | undefined) => ReactNode
children: (option: { data: TYPE, current: TYPE | undefined }) => ReactNode
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("romeo",[],t):"object"==typeof exports?exports.romeo=t():e.romeo=t()}(self,(function(){return function(){var e,t,r,o={79649:function(e,t,r){"use strict";r.d(t,{default:function(){return Yt}});var o,n=r(81643),a=r.n(n),i=r(31238),s=r.n(i),l=r(51942),c=r.n(l),u=r(92762),m=r.n(u),d=r(59340),p=r.n(d),f=r(86902),h=r.n(f),b=r(47302),v=r.n(b),g=(r(74916),r(4723),r(70189),r(51532),r(66992),r(65465),r(34553),r(79753),r(69720),r(54678),r(22083),r(60586)),y=r.n(g),E=r(67294),S=r(73935),w=r(17187),x=r.n(w),k=r(41875),T=r.n(k),A=r(11794),P=r(42123),O=r(73126),R=r(23493),L=r.n(R),D=r(94473),M=r.n(D),I=r(2991),N=r.n(I),F=r(25843),C=r.n(F),V=r(78580),q=r.n(V),H=(r(41539),r(88674),r(78783),r(33948),r(23123),r(64765),r(9653),r(39714),r(68309),r(15306),r(56977),r(39704)),z=r(58971),B=r.n(z),j=(r(84761),function(e,t){var r=y().document.createElement("video");r.ontimeupdate=function(){0!==r.currentTime&
@hsnmrd
hsnmrd / BreakPointSlice.ts
Last active July 15, 2022 19:25
controll breakpoints in reactJs (using redux)
import {createSlice, PayloadAction} from "@reduxjs/toolkit";
export enum ScreenSize {
desktopLargeXXX = 1921,
desktopLargeXX = 1919,
desktopLargeX = 1500,
desktopLarge = 1350,
desktopNormal = 1200,
desktopMiddle = 1100,
tablet = 991,
@hsnmrd
hsnmrd / RecyclerEdgeEffect.kt
Last active July 15, 2022 19:16
it supports vertical and horizontal effect
import android.graphics.Canvas
import android.widget.EdgeEffect
import androidx.dynamicanimation.animation.SpringAnimation
import androidx.dynamicanimation.animation.SpringForce
import androidx.recyclerview.widget.RecyclerView
/** The magnitude of translation distance while the list is over-scrolled. */
private const val OVERSCROLL_TRANSLATION_MAGNITUDE = 0.2f