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

Add smooth corners to <Card> #89

Merged
merged 12 commits into from
Nov 26, 2023
Merged

Add smooth corners to <Card> #89

merged 12 commits into from
Nov 26, 2023

Conversation

sashachabin
Copy link
Member

@sashachabin sashachabin commented Nov 13, 2023

Add 0.8 smooth corners to <Card> with ResizeObserver & figma-squircle

image

@sashachabin

This comment was marked as outdated.

@sashachabin sashachabin changed the title Add card iOS smooth corners Add smooth corners to <Card> Nov 13, 2023
@sashachabin sashachabin force-pushed the feature/card-smooth-corners branch 2 times, most recently from 6fe6d02 to 11c0183 Compare November 22, 2023 04:29
});
}

export function useSmoothCorners(cardRef: MutableRefObject<HTMLElement>) {
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 not always card, right?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep! Added this to Marquee ;)

@@ -53,15 +53,12 @@
.MapVehiclesSidebarVehicleInfo {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please check if changes in this file are valid?

Copy link
Member Author

Choose a reason for hiding this comment

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

Committed unnecessary changes. Thank you for your attention!

const cardRef = useRef<HTMLAnchorElement>(null);
const cardTitleRef = useRef<HTMLDivElement>(null);
useSmoothCorners(cardRef);
useSmoothCorners(cardTitleRef);
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't really need smooth corners for all titles? Only for those that have background

Copy link
Member Author

Choose a reason for hiding this comment

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

Added condition with bgcolor

@sashachabin sashachabin force-pushed the feature/card-smooth-corners branch from 144d4b9 to 11c0183 Compare November 22, 2023 18:09
@sashachabin
Copy link
Member Author

sashachabin commented Nov 23, 2023

  • Fix all sides (works only top left)

@sashachabin sashachabin force-pushed the feature/card-smooth-corners branch from 373137c to 723d4de Compare November 24, 2023 10:11
@sashachabin sashachabin merged commit 695482a into main Nov 26, 2023
1 check passed
@sashachabin sashachabin deleted the feature/card-smooth-corners branch November 26, 2023 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants