Skip to content
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

[QUILL-1542]/Jia/action-sheet #44

Merged
merged 39 commits into from
Apr 18, 2024
Merged

[QUILL-1542]/Jia/action-sheet #44

merged 39 commits into from
Apr 18, 2024

Conversation

jia-deriv
Copy link
Contributor

@jia-deriv jia-deriv commented Mar 29, 2024

Props:
ActionSheet.Root
A provider to store value using in the action sheet.

  • isOpen
    • the value for setting action sheet open or close
  • position
    • position left or right action sheet for side sheet
  • type
    • modal or non-modal action sheet
  • expandable
    • action sheet is draggable
  • onOpen
    • onOpen function
  • onClose
    • onClose function

ActionSheet.Trigger
A component to handle trigger button.

  • iconComponent
    • a props for trigger icon if not icon can use children
  • iconClassName
    • classname for icon trigger
  • iconSize
    • props for icon size

ActionSheet.Portal
A component to handle expandable drag. Props same as a div component

ActionSheet.Content
Body of the action sheet. Props same as a div component

ActionSheet.Footer
Footer part of the action sheet

  • primaryAction
    • onAction : function
    • content : button label
  • secondaryActionHandler
    • onAction : function
    • content : button label
  • alignment
    • to set button horizontal or vertical

Example usage:

<ActionSheet.Root {...props} isOpen={open} onOpen={openHandler}>
    <ActionSheet.Trigger>Click Here</ActionSheet.Trigger>
    <ActionSheet.Portal>
        <ActionSheet.Header
            title={title}
            description={description}
            closeIcon={closeIcon}
            icon={icon}
        />
        <ActionSheet.Content className="mock-action-sheet--content">
            <Text size="sm">
                Bottom sheet is a surface fixed at the bottom of the
                screen which includes content related to the
                previous screen.
            </Text>
            <Text size="sm">
                Bottom sheet is a surface fixed at the bottom of the
                screen which includes content related to the
                previous screen.
            </Text>
            <Text size="sm">
                Bottom sheet is a surface fixed at the bottom of the
                screen which includes content related to the
                previous screen.
            </Text>
        </ActionSheet.Content>
        <ActionSheet.Footer
            primaryAction={primaryAction}
            secondaryAction={secondaryAction}
            alignment={alignment}
        />
    </ActionSheet.Portal>
</ActionSheet.Root>

Copy link

cloudflare-workers-and-pages bot commented Apr 1, 2024

Deploying quill-ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4a7fd18
Status:⚡️  Build in progress...

View logs

@jia-deriv jia-deriv changed the title Jia/QUILL-1542/action-sheet [QUILL-1542]/Jia/action-sheet Apr 1, 2024
@jia-deriv jia-deriv marked this pull request as ready for review April 2, 2024 09:31
@prince-deriv prince-deriv merged commit 125e2e1 into main Apr 18, 2024
2 of 3 checks passed
@prince-deriv prince-deriv deleted the Jia/action-sheet branch April 18, 2024 05:54
Copy link

🎉 This PR is included in version 1.7.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants