-
Notifications
You must be signed in to change notification settings - Fork 75
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
UI: Edit page allocated devices #1588
Conversation
@Shruti-Apte Is it ready for review? |
@@ -43,7 +43,7 @@ const BUTTON_STYLES = { | |||
const SIZES = { small: "small", medium: "medium", large: "large" }; | |||
|
|||
const Button = ({ | |||
style = "primary", | |||
style, |
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.
why the primary
value is removed?
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.
Because it was applying primary style to the buttons where it is not needed.
for example in some places we are using <Button>
component with it's own modified CSS but if we pass primary as a default value, it's combing the primary css style with modified css.
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.
By default, the primary style is needed. Update the Button component to overwrite the primary styles with the modified css from the importing component. Please check the Miru docs of the Button component https://docs.miru.so/contributing-guide/component-library/button
What I mean is whenever someone imports the Button component, then by default primary style should be loaded without passing any style prop
app/javascript/src/components/Profile/UserDetail/AllocatedDevicesDetails/Edit/EditPage.tsx
Outdated
Show resolved
Hide resolved
app/javascript/src/components/Profile/UserDetail/AllocatedDevicesDetails/Edit/EditPage.tsx
Outdated
Show resolved
Hide resolved
</div> | ||
</div> | ||
<Divider CustomStyle="my-5 w-11/12" /> | ||
</React.Fragment> |
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.
Fragment
. import it at the top
</div> | ||
<div className="w-10/12"> | ||
{devices.map(device => ( | ||
<React.Fragment key={device.id}> |
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.
Import the Fragment but the ideal one is <div>
</span> | ||
</div> | ||
<div className="w-10/12"> | ||
{devices.map(device => ( |
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.
Destructure the values of devise
Closess issue #1533