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

fix(suite): Fix buy/sell/dca buttons #15795

Closed
wants to merge 1 commit into from
Closed

Conversation

jvaclavik
Copy link
Contributor

Description

Related Issue

Resolve

Screenshots:

before
image

after
image

@adamhavel
Copy link
Contributor

adamhavel commented Dec 5, 2024

I don't think this is a good idea. Select bar is a form component, not a navigation one. I'd just create the Subtabs component. Or use Tabs here, since it's supposed to be there anyway.

@@ -156,6 +163,7 @@ type ValueTypes = number | string | boolean;
type Option<V extends ValueTypes> = {
label: ReactNode;
value: V;
icon?: IconName;
Copy link
Contributor

Choose a reason for hiding this comment

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

iconName


export const allowedSelectBarFrameProps = ['margin', 'width'] as const satisfies FramePropsKeys[];
type AllowedFrameProps = Pick<FrameProps, (typeof allowedSelectBarFrameProps)[number]>;

export const fillTypes = ['none', 'default'] as const;
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we should create a common fill types like for other props, it's used in many components.

}>`
position: relative;
display: grid;
grid-auto-columns: ${({ $optionsCount }) => `minmax(${getPuckWidth($optionsCount)}, 1fr)`};
grid-auto-flow: column;
gap: ${spacingsPx.xxs};
padding: ${spacingsPx.xxs};
background: ${mapElevationToBackground};
background: ${({ $fillType, theme, $elevation }) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Do it the other way around, unset the background when fillType is none. Then you don't have to pass all the props to the mapElevationToBackground.

@jvaclavik
Copy link
Contributor Author

Already fixed in other PR

@jvaclavik jvaclavik closed this Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants