Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@plaidev/karte-action-utils

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@plaidev/karte-action-utils

karte action utils

  • 0.4.172
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-89.47%
Maintainers
2
Weekly downloads
 
Created
Source

KARTE Action Utilities

KARTE の Action で使えるユーティリを提供するライブラリです。

ユーティリティは以下の構成となっています。

  • Modal Utilities

Modal Utilities

KARTE の Action でモーダルを出すために使えるユーティリティ群です。

ensureModalRoot

KARTE の接客のモーダルのルート要素を生成します。

const root = ensureModalRoot(false) as HTMLElement;

createModalWindow

KARTE の接客のモーダルウィンドウを生成します。

const win = createModalWindow({
  w: "320px",
  minw: "90vw",
  h: "auto",
  maxh: "500px",
  position: "center",
  zIndex: 1200,
});

getPositionStyle

KARTE の接客の要素の画面内での表示位置の css style を生成します。

const el = document.createElement("div");
const s = el.style;
const pos = getPositionStyle(position);
Object.assign(s, pos);

h

JSX element を生成します。

const e = <a style="text-decoration: none" href="https://karte.io/">
  <img src="https://plaid.co.jp/v2/img/logo_karte.svg" />
  <p>テストです</p>
</a>

detectElementOnViewport

HTML の特定の要素が画面上に表示されたかを判定します。

const el = document.querySelector(".endcontent");
const d = detectElementOnViewport(el, {
  onAppear: () => {
    send("read-done", {});
  },
  intersection: {
    root: null,
    threshold: 1,
    rootMargin: "0px",
  }
});

FAQs

Package last updated on 13 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc