-
Notifications
You must be signed in to change notification settings - Fork 6
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
[DTRA-1047] henry/dtra-1047/feat: snackbar UI #56
Merged
Merged
Changes from 13 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
701e0a7
feat: snackbar ui initial commit
henry-deriv 31f678c
fix: change height of canvas for better visibility
henry-deriv 0aaaca6
fix: revert package.json and package-lock.json
henry-deriv 8ae6155
fix: revert main.tsx to head of main branch
henry-deriv caa3c53
fix: revert main.tsx to head of main branch
henry-deriv 1cbc167
test: test cases
henry-deriv 1daa569
fix: re-add package and package-lock
henry-deriv 01e37d6
fix: revert main.tsx
henry-deriv 575b92d
fix: revert main.tsx
henry-deriv 41b941b
fix: merge main
henry-deriv 21964fb
Merge branch 'main' into henry/dtra-1047/snackbar-component
henry-deriv 9c55468
fix: comments
henry-deriv 6235344
test: add snapshot tests
henry-deriv 7b5432d
fix: remove package-lock
henry-deriv 7adc494
fix: make snackbar compatible with small screen size
henry-deriv b6135ce
fix: empty commit
henry-deriv 7b04ad1
fix: breakpoints mixin bug
henry-deriv 34b5fc7
fix: merge master
henry-deriv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { StandalonePlaceholderRegularIcon } from "@deriv/quill-icons/Standalone"; | ||
import { Snackbar } from "."; | ||
import React, { useState } from "react"; | ||
|
||
export const SnackbarWrapper = () => { | ||
const [isOpen, setIsOpen] = useState(false); | ||
|
||
const handleActionClick = () => { | ||
handleClose(); | ||
kate-deriv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}; | ||
|
||
const handleOpen = () => { | ||
setIsOpen(true); | ||
}; | ||
|
||
const handleClose = () => { | ||
setTimeout(() => { | ||
henry-deriv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
setIsOpen(false); | ||
}, 1000); | ||
}; | ||
|
||
return ( | ||
<div> | ||
<button onClick={handleOpen} style={{ color: "white" }}> | ||
henry-deriv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Click me | ||
</button> | ||
<Snackbar | ||
icon={ | ||
<StandalonePlaceholderRegularIcon | ||
fill="#ffffff" | ||
iconSize="sm" | ||
/> | ||
} | ||
message="Enter message here" | ||
actionText="Action" | ||
onActionClick={handleActionClick} | ||
isOpen={isOpen} | ||
onClose={handleClose} | ||
/> | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
it's weird but i couldn't find the place where this component is used..
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.
its just a wrapper to pass functions into the component to work for now. For the next task it'll be used.