feat: background grid
Description
I added a simple component in the Effects group named BackgroundGrid that can be used to add a background grid to any page or any container very easily.
Related Issue
Fixes #202
Proposed Changes
- added the BackgroundGrid component to
src/showcase/effects/BackgroundGrid.tsx - added the BackgroundGrid example to
src/showcase/ui-group/EffectCards.tsx- for this, I added a check in the
data.mapthat will display an Image only whenitem.imageexists and will display a preview only whenitem.previewexists so that we can use components as previews instead of only images
- for this, I added a check in the
- added the docs page to
src/app/(docs)/effects/background-grid/page.mdx- I used
ComponentPreviewwith thepreviewoverride prop so that I can customize the props likesize,color,strokeWidth, etc. to make it fit better on the page.
- I used
- added the appropriate link to
src/components/Navigation.tsxwith thenewtag - added my name to the
credits.mdunder this new addition
Screenshots
Checklist
Please check the boxes that apply:
- [x] I have rebased my branch on top of the latest
mainbranch. - [x] I have tested the changes locally
- [x] I ran
npm run buildand build is successful - [x] I have added necessary documentation (if applicable)
- [x] I have updated the credits.md file (if applicable)
@epoll31 is attempting to deploy a commit to the SyntaxUI Team on Vercel.
A member of the Team first needs to authorize it.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| syntax-ui | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 5, 2024 5:19am |
I've made the changes, but the new cn function is breaking things, so it it not ready to be merged just yet.
@Ansub I have made the changes to use the new usingCn flag and I switched the cn function to import from utils. The background grid is working effectively and should be good now.
I updated the BackgroundGrid component to have an elliptical fade effect now. I also removed the fade controls from the component which makes it more opinionated.
can you fix the merge conflicts bro, i will merge it then
Should be good now