@primitives/block
TypeScript icon, indicating that this package has built-in type declarations

3.1.0 • Public • Published

Block is a box that holds other components inside. It can be styled to some limited extent. The closest analogs are:

  • div in Web
  • View in Native
type TBlock<TRef, TStyles> = {
  ref?: Ref<TRef>,
  style?: TStyles,
  id?: string,
  width?: number,
  height?: number,
  top?: number,
  right?: number,
  bottom?: number,
  left?: number,
  opacity?: number,
  isFloating?: boolean,
  shouldIgnorePointerEvents?: boolean,
  shouldStretch?: boolean,
  children?: ReactNode,
  onPointerEnter?: () => void,
  onPointerLeave?: () => void
}

⚠️TStyles and TRef differ on Native and Web given each one’s different environment-specific elements and document-models.

/@primitives/block/

    Package Sidebar

    Install

    npm i @primitives/block

    Weekly Downloads

    30

    Version

    3.1.0

    License

    MIT

    Unpacked Size

    31.2 kB

    Total Files

    16

    Last publish

    Collaborators

    • julia.spehrer
    • ijigg
    • psxcode
    • deepsweet
    • xaviervia
    • irminakacz
    • fosimus
    • atilaz
    • moria.am
    • gideon.gur