-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
GFier
committed
Aug 26, 2024
1 parent
7d365da
commit 1f7f8f0
Showing
17 changed files
with
482 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
app/(pages)/home/(components)/example-1/example.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.example { | ||
position: fixed; | ||
height: 100vh; | ||
width: 100vw; | ||
padding-bottom: 2vh; | ||
|
||
.item { | ||
position: absolute; | ||
inset: 0; | ||
width: fit-content; | ||
height: fit-content; | ||
color: var(--theme-primary); | ||
background-color: var(--theme-secondary); | ||
will-change: transform; | ||
user-select: none; | ||
touch-action: none; | ||
|
||
@include desktop { | ||
padding: desktop-vw(12px); | ||
border-radius: desktop-vw(8px); | ||
} | ||
|
||
> * { | ||
touch-action: none; | ||
} | ||
|
||
&.bounce { | ||
background-color: var(--white); | ||
color: var(--theme-secondary); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
'use client' | ||
|
||
import Elastica, { | ||
AxisAlignedBoundaryBox, | ||
initalConditionsPresets, | ||
updatePresets, | ||
} from '@darkroom.engineering/elastica/react' | ||
import s from './example.module.scss' | ||
|
||
export function Example1() { | ||
return ( | ||
<section className={s.example}> | ||
<Elastica | ||
showHashGrid | ||
config={{ | ||
gridSize: 3, | ||
collisions: true, | ||
borders: 'rigid', | ||
}} | ||
initialCondition={initalConditionsPresets.random} | ||
update={updatePresets.dvdScreenSaver} | ||
> | ||
{[{ name: 'DVD' }].map(({ name }, index) => ( | ||
<AxisAlignedBoundaryBox key={index} className={s.item}> | ||
{name} | ||
</AxisAlignedBoundaryBox> | ||
))} | ||
</Elastica> | ||
</section> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
1f7f8f0
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.
"⚡️ Lighthouse report for the changes in this commit:
🔴 Performance: 43
🟢 Accessibility: 90
🟠 Best practices: 79
🟠 SEO: 83
Lighthouse ran on https://vercel.com/login?next=%2Fsso-api%3Furl%3Dhttps%253A%252F%252Fsatus-storybook-e4ph3lx8x-darkroom-engineering.vercel.app%252F%26nonce%3D2b76041d98861ba5d6a256856aefd44a6609efe0ffddb2e62d80d64a3bfc5cbe"