Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Niloofar / Dropdown implementations #12

Merged
merged 3 commits into from
Oct 20, 2023

Conversation

niloofar-deriv
Copy link
Contributor

This PR includes our global dropdown component!

Copy link
Contributor

@hasan-deriv hasan-deriv left a comment

Choose a reason for hiding this comment

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

Are we not doing testing?

@niloofar-deriv niloofar-deriv force-pushed the niloo/86bw351qv/dropdown branch from 12749aa to 75426dd Compare October 18, 2023 08:06
@@ -1,3 +0,0 @@
const Button = () => <div>button</div>;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need button, modal and dropdown components in the common folder cause we have them inside the ui folder.
So I removed these extra files.

@@ -1,7 +1,15 @@
import { describe, expect, it } from 'vitest';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
Copy link
Contributor Author

@niloofar-deriv niloofar-deriv Oct 18, 2023

Choose a reason for hiding this comment

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

Moved the test file to the __test__ folder!

@@ -1,21 +0,0 @@
// Button.stories.ts|tsx
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This story was written for the old button component so I removed that

@@ -0,0 +1,75 @@
import { forwardRef, ElementRef, ComponentPropsWithoutRef } from 'react';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Auto generated component

const DropdownMenuPortal = Portal;
const DropdownMenuSub = Sub;
const DropdownMenuRadioGroup = RadioGroup;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we don't have a common drop-down style I removed all of the classnames, later when we want to use this we can pass the classes to it!

@matin-deriv matin-deriv merged commit 305c8ff into deriv-com:main Oct 20, 2023
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants