UNPKG

@cursorify/react

Version:

Customizable cursor component for any style 🕹️

20 lines (19 loc) 872 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DefaultCursor = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const useCursorify_1 = require("../../hooks/useCursorify"); const DefaultCursor = ({ disabled }) => { const { style } = (0, useCursorify_1.useCursorify)(); return ((0, jsx_runtime_1.jsx)("div", { style: { width: '23px', height: '23px', borderRadius: '50%', transition: 'opacity 0.1s ease-in-out, transform 0.1s ease-in-out, background-color 0.1s ease-in-out', backgroundColor: !disabled && style === 'pointer' ? 'rgba(210, 210, 210, 0.4)' : 'rgba(210, 210, 210, 0.8)', transform: !disabled && style === 'pointer' ? 'scale(2.3)' : 'scale(1)', } })); }; exports.DefaultCursor = DefaultCursor;