-
Notifications
You must be signed in to change notification settings - Fork 2
Carousel #1333
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
Carousel #1333
Conversation
This causes a bug in Safari where the button is still visible, but the icon is not.
🦋 Changeset detectedLatest commit: 2db7498 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Bra jobba 💪
className={cx(className, _className)} | ||
// This can be used (internally) in other components | ||
// to apply custom styles to the media element depending on the fit | ||
data-fit={fit} |
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.
Her var egentlig planen å prøve å targete Media
fra Carousel
med en slik selector: &.\*\:object-contain:bg-blue-dark
, men får det ikke til å funke med tailwind. Så har derfor lagt til dette custom-attributtet istedenfor.
Det føles også litt mer riktig, for da er det lettere å bruke dette til evt. annen styling man ønsker i spesielle tilfeller.
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.
Nå begynner det å ligne på noe! Bra jobbet 👏
Carousel
grunnmuren-react
New
Carousel
component that can be used for any content, all though primarily intended for media such as images andVideoLoops
.Usage
Screen.Recording.2025-06-06.at.14.34.39.mov
Use the
fit
prop on the<Media>
primitive to control theobject-fit
(cover
|contain
) behavior of it's children, this is a way to prevent cropping of images in portrait format. This defaults tocover
, so for portrait images set it tocontain
.In Hero
The component can also be used inside the
<Hero>
component:Screen.Recording.2025-06-06.at.14.32.40.mov
Screen.Recording.2025-06-06.at.14.33.11.mov
grunnmuren-tailwind
A new
scrollbar-hidden
utility class has been added which hides scorllbar visually. This is needed in the<Carousel>
component, as it usessnap-scroll
and might come in handy in other places as well.