-
Couldn't load subscription status.
- Fork 1
[headless-component]Availability component #419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| availabilityStatusText: string; | ||
| availabilityStatusButtonText: string; | ||
| shouldShowAvailabilityStatusText: boolean; | ||
| shouldShowAvailabilityStatusButton: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe cleaner API for that component
availabilityStatusText = null or empty string will now show availability
availabilityCTA = {
text: string empty or null will not show text
openModal: () => void;
className?: string;
asChild?: boolean;
}
}
I tink that is availabilityStatusText or am I missing something
the only option you have is show button or not if not showing you don't need the button
and you are not openModal
|
|
||
| operationId?: string; | ||
| availabilityStatus?: { | ||
| isMenuOfItemAvailable?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure that I understand what this Flag mean
| item?: Signal<EnhancedItem | undefined>; | ||
| quantity: Signal<number>; | ||
| specialRequest: Signal<string>; | ||
| shouldShowAvailabilityStatusText: Signal<boolean>; | ||
| availabilityStatusText: Signal<string>; | ||
| availabilityStatusButtonText: Signal<string>; | ||
| shouldShowAvailabilityStatusButton: Signal<boolean>; | ||
| openAvailabilityModal: Signal<() => void>; | ||
| lineItem: Signal<LineItem>; | ||
| selectedVariant: Signal<Variant | undefined>; | ||
| selectedModifiers: Signal<Record<string, Array<string>>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that nested the data of item could make this api clearer
itemData {
operationId?: string;
itemId?: string;
item?: Signal<EnhancedItem | undefined>;
lineItem: Signal;
}
userSelection/Preference {
quantity: Signal;
specialRequest: Signal;
variant: Signal<Variant | undefined>;
modifiers: Signal<Record<string, Array>>;
}
#pr