diff --git a/example/storybook/stories/components/composites/Actionsheet/Icon.tsx b/example/storybook/stories/components/composites/Actionsheet/Icon.tsx index 7ede85c57..ce1450555 100644 --- a/example/storybook/stories/components/composites/Actionsheet/Icon.tsx +++ b/example/storybook/stories/components/composites/Actionsheet/Icon.tsx @@ -24,68 +24,28 @@ export function Example() { - } + startIcon={} > Delete - } + startIcon={} > Share - } + startIcon={} > Play - } + startIcon={} > Favourite + } diff --git a/example/storybook/stories/components/composites/Actionsheet/Usage.tsx b/example/storybook/stories/components/composites/Actionsheet/Usage.tsx index cef175086..8c85ab566 100644 --- a/example/storybook/stories/components/composites/Actionsheet/Usage.tsx +++ b/example/storybook/stories/components/composites/Actionsheet/Usage.tsx @@ -21,7 +21,7 @@ export function Example() { Delete - Share + Share Play Favourite Cancel diff --git a/package.json b/package.json index 1170ad83e..ebe8165ae 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "prettier --write" ] }, - "version": "3.4.0-rc.7", + "version": "3.4.0-rc.10", "license": "MIT", "private": false, "main": "lib/commonjs/index", diff --git a/src/components/composites/Actionsheet/ActionsheetItem.tsx b/src/components/composites/Actionsheet/ActionsheetItem.tsx index 0b3106918..5c2240272 100644 --- a/src/components/composites/Actionsheet/ActionsheetItem.tsx +++ b/src/components/composites/Actionsheet/ActionsheetItem.tsx @@ -1,24 +1,99 @@ import React, { memo, forwardRef } from 'react'; -import { Button } from '../../primitives/Button'; -import type { IActionsheetItemProps } from './types'; +import { Pressable } from '../../primitives/Pressable'; +import Box from '../../primitives/Box'; +import { HStack } from '../../primitives/Stack'; +import Spinner from '../../primitives/Spinner'; import { usePropsResolution } from '../../../hooks'; import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps'; +import type { IActionsheetItemProps } from './types'; -const ActionsheetItem = (props: IActionsheetItemProps, ref?: any) => { - const resolvedProps = usePropsResolution( - 'ActionsheetItem', - props, - undefined, - { - cascadePseudoProps: true, - } - ); +const ActionsheetItem = ( + { + //@ts-ignore + children, + startIcon, + rightIcon, + leftIcon, + endIcon, + spinner, + isDisabled, + isLoading, + spinnerPlacement = 'start', + ...props + }: IActionsheetItemProps, + ref: any +) => { + const { + _text, + _stack, + _icon, + _spinner, + isLoadingText, + ...resolvedProps + } = usePropsResolution('ActionsheetItem', props, undefined, { + cascadePseudoProps: true, + }); //TODO: refactor for responsive prop if (useHasResponsiveProps(props)) { return null; } - return