()
| 23 | }; |
| 24 | |
| 25 | const CircularTextDemo = () => { |
| 26 | const { props, updateProp, resetProps, hasChanges } = useComponentProps(DEFAULT_PROPS); |
| 27 | const { text, onHover, spinDuration } = props; |
| 28 | |
| 29 | const propData = useMemo( |
| 30 | () => [ |
| 31 | { |
| 32 | name: 'text', |
| 33 | type: 'string', |
| 34 | default: "''", |
| 35 | description: 'The text to display in a circular layout.' |
| 36 | }, |
| 37 | { |
| 38 | name: 'spinDuration', |
| 39 | type: 'number', |
| 40 | default: '20', |
| 41 | description: 'The duration (in seconds) for one full rotation.' |
| 42 | }, |
| 43 | { |
| 44 | name: 'onHover', |
| 45 | type: "'slowDown' | 'speedUp' | 'pause' | 'goBonkers'", |
| 46 | default: 'undefined', |
| 47 | description: |
| 48 | "Specifies the hover behavior variant. Options include 'slowDown', 'speedUp', 'pause', and 'goBonkers'." |
| 49 | }, |
| 50 | { |
| 51 | name: 'className', |
| 52 | type: 'string', |
| 53 | default: "''", |
| 54 | description: 'Optional additional CSS classes to apply to the component.' |
| 55 | } |
| 56 | ], |
| 57 | [] |
| 58 | ); |
| 59 | |
| 60 | const options = [ |
| 61 | { label: 'Slow Down', value: 'slowDown' }, |
| 62 | { label: 'Speed Up', value: 'speedUp' }, |
| 63 | { label: 'Pause', value: 'pause' }, |
| 64 | { label: 'Go Bonkers', value: 'goBonkers' } |
| 65 | ]; |
| 66 | |
| 67 | return ( |
| 68 | <ComponentPropsProvider props={props} defaultProps={DEFAULT_PROPS} resetProps={resetProps} hasChanges={hasChanges}> |
| 69 | <TabsLayout> |
| 70 | <PreviewTab> |
| 71 | <Box position="relative" className="demo-container" h={400} overflow="hidden"> |
| 72 | <CircularText text={text} onHover={onHover} spinDuration={spinDuration} /> |
| 73 | </Box> |
| 74 | |
| 75 | <Customize className="preview-options"> |
| 76 | <PreviewInput |
| 77 | title="Text" |
| 78 | value={text} |
| 79 | placeholder="Enter text..." |
| 80 | width={220} |
| 81 | maxLength={25} |
| 82 | onChange={val => updateProp('text', val)} |
nothing calls this directly
no test coverage detected