-
-
Notifications
You must be signed in to change notification settings - Fork 1
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 button and drag to swap colors #227
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for oddcontrast ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
* main: lint Bump the dev-minor group across 1 directory with 15 updates Bump jsdom from 25.0.1 to 26.0.0 in the dev-major group Bump the dev-minor group with 6 updates upgrade node and yarn Bump the dev-minor group with 6 updates Bump the dev-minor group with 7 updates Bump the dev-minor group with 12 updates
const switchColorsT = () => { | ||
switchColors(); | ||
}; |
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.
Why do we need to wrap this?
const makeDropable = (event: DragEvent) => { | ||
if (!isDragging) event.preventDefault(); | ||
}; |
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.
What does this do in practice?
role="complementary" | ||
class="swatch {type}" | ||
draggable="true" | ||
ondrop={switchColorsT} |
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.
In practice, this means that colors are switched whenever anything is dropped onto one of the colors. E.g. I can drop an image, URL, etc. Can we limit it to just when the other color is dropped?
Description
Currently not designed, this is to show possibilities.
Related Issue(s)
#108
Todo