From a70009399cbb7072d1f22581d522b5f0ba73b86e Mon Sep 17 00:00:00 2001 From: Best Codes <106822363+The-Best-Codes@users.noreply.github.com> Date: Sat, 9 Nov 2024 15:08:31 -0600 Subject: [PATCH] feat: :heavy_plus_sign: add volantes cursor --- src/VolantesCursor/VolantesCursor.tsx | 28 ++++++++++++ src/VolantesCursor/index.ts | 2 + src/VolantesCursor/svgs/Default.tsx | 63 +++++++++++++++++++++++++++ src/VolantesCursor/svgs/Pointer.tsx | 53 ++++++++++++++++++++++ src/VolantesCursor/svgs/Text.tsx | 53 ++++++++++++++++++++++ src/index.ts | 1 + 6 files changed, 200 insertions(+) create mode 100644 src/VolantesCursor/VolantesCursor.tsx create mode 100644 src/VolantesCursor/index.ts create mode 100644 src/VolantesCursor/svgs/Default.tsx create mode 100644 src/VolantesCursor/svgs/Pointer.tsx create mode 100644 src/VolantesCursor/svgs/Text.tsx diff --git a/src/VolantesCursor/VolantesCursor.tsx b/src/VolantesCursor/VolantesCursor.tsx new file mode 100644 index 0000000..0450554 --- /dev/null +++ b/src/VolantesCursor/VolantesCursor.tsx @@ -0,0 +1,28 @@ +import { CursorProps, useCursorify } from '@cursorify/react' +import React from 'react' +import Default from './svgs/Default' +import Pointer from './svgs/Pointer' +import Text from './svgs/Text' + +export const VolantesCursor: React.FC = ({ disabled }) => { + const { style } = useCursorify() + + const margin = disabled ? 24 : style === 'default' ? 24 : 12 + return ( +
+ {(() => { + if (disabled) return + if (style === 'pointer') return + if (style === 'text') return + return + })()} +
+ ) +} \ No newline at end of file diff --git a/src/VolantesCursor/index.ts b/src/VolantesCursor/index.ts new file mode 100644 index 0000000..19eb8e7 --- /dev/null +++ b/src/VolantesCursor/index.ts @@ -0,0 +1,2 @@ +// https://github.com/varlesh/volantes-cursors +export * from "./VolantesCursor"; diff --git a/src/VolantesCursor/svgs/Default.tsx b/src/VolantesCursor/svgs/Default.tsx new file mode 100644 index 0000000..27a8a18 --- /dev/null +++ b/src/VolantesCursor/svgs/Default.tsx @@ -0,0 +1,63 @@ +import React from "react"; + +function Default() { + return ( + + + + + + + + + + + + + + + + + ); +} + +export default Default; diff --git a/src/VolantesCursor/svgs/Pointer.tsx b/src/VolantesCursor/svgs/Pointer.tsx new file mode 100644 index 0000000..f5135d4 --- /dev/null +++ b/src/VolantesCursor/svgs/Pointer.tsx @@ -0,0 +1,53 @@ +import React from "react"; + +function Pointer() { + return ( + + + + + + + + + + + + + + ); +} + +export default Pointer; diff --git a/src/VolantesCursor/svgs/Text.tsx b/src/VolantesCursor/svgs/Text.tsx new file mode 100644 index 0000000..884844f --- /dev/null +++ b/src/VolantesCursor/svgs/Text.tsx @@ -0,0 +1,53 @@ +import React from "react"; + +function Text() { + return ( + + + + + + + + + + + + + + ); +} + +export default Text; diff --git a/src/index.ts b/src/index.ts index 17d84a1..a73abc1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,3 @@ export * from './EmojiCursor' export * from './PhingerCursor' +export * from './VolantesCursor' \ No newline at end of file