From 2fb8407e10c7be8a54aa4ef8b9cc5fdd721e2a81 Mon Sep 17 00:00:00 2001 From: ArifKobel Date: Sat, 2 Mar 2024 15:15:07 +0100 Subject: [PATCH] feat: add style prop to OrbitItem component The style prop allows users to pass custom CSS styles to the OrbitItem component, giving them more control over the appearance of the component. --- packages/react-orbit/src/components/orbit.item.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react-orbit/src/components/orbit.item.tsx b/packages/react-orbit/src/components/orbit.item.tsx index 0a35e34..d67c68a 100644 --- a/packages/react-orbit/src/components/orbit.item.tsx +++ b/packages/react-orbit/src/components/orbit.item.tsx @@ -12,6 +12,7 @@ export type OrbitItemProps = { delay?: number; startAngle?: number; direction?: OrbitItemDirection; + style?: React.CSSProperties; } & React.HTMLAttributes; export const OrbitItem = ({ @@ -22,6 +23,7 @@ export const OrbitItem = ({ delay = 10, startAngle = 0, direction = 'clockwise', + style, ...rest }: OrbitItemProps) => { const [angle, setAngle] = React.useState(startAngle); @@ -44,6 +46,7 @@ export const OrbitItem = ({ left: `${x}px`, transform: `translate(-50%, -50%)`, pointerEvents: 'all', + ...style, }} className={className} {...rest}