()
| 24 | }; |
| 25 | |
| 26 | const CurvedLoopDemo = () => { |
| 27 | const [key, forceRerender] = useForceRerender(); |
| 28 | |
| 29 | const { props, updateProp, resetProps, hasChanges } = useComponentProps(DEFAULT_PROPS); |
| 30 | const { marqueeText, speed, curveAmount, interactive } = props; |
| 31 | |
| 32 | const propData = useMemo( |
| 33 | () => [ |
| 34 | { |
| 35 | name: 'marqueeText', |
| 36 | type: 'string', |
| 37 | default: '""', |
| 38 | description: 'The text to display in the curved marquee' |
| 39 | }, |
| 40 | { |
| 41 | name: 'speed', |
| 42 | type: 'number', |
| 43 | default: '2', |
| 44 | description: 'Animation speed of the marquee text' |
| 45 | }, |
| 46 | { |
| 47 | name: 'className', |
| 48 | type: 'string', |
| 49 | default: 'undefined', |
| 50 | description: 'CSS class name for styling the text' |
| 51 | }, |
| 52 | { |
| 53 | name: 'curveAmount', |
| 54 | type: 'number', |
| 55 | default: '400', |
| 56 | description: 'Amount of curve in the text path' |
| 57 | }, |
| 58 | { |
| 59 | name: 'direction', |
| 60 | type: '"left" | "right"', |
| 61 | default: '"left"', |
| 62 | description: 'Initial direction of the marquee animation' |
| 63 | }, |
| 64 | { |
| 65 | name: 'interactive', |
| 66 | type: 'boolean', |
| 67 | default: 'true', |
| 68 | description: 'Whether the marquee can be dragged by the user' |
| 69 | } |
| 70 | ], |
| 71 | [] |
| 72 | ); |
| 73 | |
| 74 | return ( |
| 75 | <ComponentPropsProvider props={props} defaultProps={DEFAULT_PROPS} resetProps={resetProps} hasChanges={hasChanges}> |
| 76 | <TabsLayout> |
| 77 | <PreviewTab> |
| 78 | <Box position="relative" className="demo-container" h={400} overflow="hidden" p={0}> |
| 79 | <CurvedLoop |
| 80 | key={key} |
| 81 | marqueeText={marqueeText} |
| 82 | speed={speed} |
| 83 | curveAmount={curveAmount} |
nothing calls this directly
no test coverage detected