import type { Meta, StoryObj } from '@storybook/react'; import { PixelParallaxGroup, PixelParallaxLayer, PixelMouseParallax } from './parallax'; import { ParallaxPxlKitIcon, PxlKitIcon } from '@pxlkit/core'; import { CoolEmoji, PixelHeart, RetroTV } from '@pxlkit/parallax'; import { Trophy, Crown } from '@pxlkit/gamification'; const meta: Meta = { title: 'UI Kit / Parallax', parameters: { layout: 'padded' }, }; export default meta; type Story = StoryObj; export const AllParallax: Story = { render: () => (

PixelMouseParallax · move the mouse

PixelParallaxLayer · scroll-driven

), }; /* ────────────────────────────────────────────────────────────────────────── PixelParallaxGroup ────────────────────────────────────────────────────────────────────────── */ export const PixelParallaxGroupStory: Story = { name: 'PixelParallaxGroup', render: (args: any) => ( ), argTypes: { as: { control: 'select', options: ['div', 'section', 'header', 'main'] }, }, args: { as: 'div' }, }; /* ────────────────────────────────────────────────────────────────────────── PixelParallaxLayer ────────────────────────────────────────────────────────────────────────── */ export const PixelParallaxLayerStory: Story = { name: 'PixelParallaxLayer', render: (args: any) => (
), argTypes: { speed: { control: { type: 'number', step: 0.1 } }, axis: { control: 'inline-radio', options: ['x', 'y', 'both'] }, }, args: { speed: 0.4, axis: 'y' }, }; /* ────────────────────────────────────────────────────────────────────────── PixelMouseParallax ────────────────────────────────────────────────────────────────────────── */ export const PixelMouseParallaxStory: Story = { name: 'PixelMouseParallax', render: (args: any) => ( ), argTypes: { strength: { control: { type: 'number' } }, invert: { control: 'boolean' }, }, args: { strength: 30, invert: false }, };