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

[DTRA-1047] henry/dtra-1047/feat: snackbar UI #56

Merged
merged 18 commits into from
Apr 15, 2024

Conversation

henry-deriv
Copy link
Contributor

Snackbar component - mobile and desktop. Dark mode only.

Copy link

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

Deploying quill-ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: 34b5fc7
Status: ✅  Deploy successful!
Preview URL: https://97f9164b.quill-ui.pages.dev
Branch Preview URL: https://henry-dtra-1047-snackbar-com.quill-ui.pages.dev

View logs

@henry-deriv henry-deriv changed the title feat: snackbar ui initial commit [DTRA-1047] feat: snackbar ui initial commit Apr 5, 2024
@henry-deriv henry-deriv changed the title [DTRA-1047] feat: snackbar ui initial commit [DTRA-1047] feat: snackbar UI Apr 5, 2024
package.json Outdated Show resolved Hide resolved
lib/components/Snackbar/snackbar.scss Outdated Show resolved Hide resolved

.snackbar {
display: flex;
width: 340px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove width for mobile devices. For smaller mobiles, width 340px will go out of the container.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should I? i'm trying to follow figma design

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it's better to do something like this:

left: 16px;
width: calc(100vw - 32px);

and i guess all px values in this file should be replaced with var()'s :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why's it left: 16px? It'll be centered by the wrapper.

lib/components/Snackbar/snackbar.scss Outdated Show resolved Hide resolved
lib/components/Snackbar/index.tsx Outdated Show resolved Hide resolved
@henry-deriv henry-deriv changed the title [DTRA-1047] feat: snackbar UI [DTRA-1047] henry/dtra-1047/feat: snackbar UI Apr 8, 2024
package-lock.json Outdated Show resolved Hide resolved
? "fast-animation"
: "slow-animation",
)}
{...rest}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of the position of {...rest} it might overwrite className. Maybe it's better to insert {..rest} in the top?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henry-deriv you might have forgotten to address this :)

Copy link
Contributor Author

@henry-deriv henry-deriv Apr 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i didnt make any changes because it makes no difference in this case. The animations are very much working as they should.


.snackbar {
display: flex;
width: 340px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it's better to do something like this:

left: 16px;
width: calc(100vw - 32px);

and i guess all px values in this file should be replaced with var()'s :)

import { Snackbar } from ".";
import React, { useState } from "react";

export const SnackbarWrapper = () => {
Copy link
Contributor

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..

Copy link
Contributor Author

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.

? "fast-animation"
: "slow-animation",
)}
{...rest}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henry-deriv you might have forgotten to address this :)

@prince-deriv prince-deriv merged commit befafcf into main Apr 15, 2024
4 checks passed
@prince-deriv prince-deriv deleted the henry/dtra-1047/snackbar-component branch April 15, 2024 06:27
Copy link

🎉 This PR is included in version 1.6.0 🎉

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.

7 participants