react-crossword icon indicating copy to clipboard operation
react-crossword copied to clipboard

feat: expose CrosswordSizeContext & Provider

Open akirabaruah opened this issue 3 years ago • 4 comments

Enables users to modify CrosswordSizeContext via its associated Provider. All previous default values remain unchanged for backwards compatibility.

Also makes cellTextVerticalOffset a configurable parameter of CrosswordSizeContext. This vertical offset was previously hardcoded to 1 which displayed text awkwardly low in larger grids (e.g. 40x40). A user can now override this default to 0 to keep text vertically centered in smaller cells.

akirabaruah avatar Apr 30 '22 00:04 akirabaruah

Hey @JaredReisinger some extra context:

I'm using this module for a personal project and saw that text was offset a bit too low on a grid about 36x36. So I made some changes here to expose the CrosswordSizeContext to higher level components to enable some optional tweaks. Let me know what you think. Thanks!

akirabaruah avatar Apr 30 '22 00:04 akirabaruah

Friendly bump @JaredReisinger 😃 Mind taking a look?

akirabaruah avatar Jun 01 '22 07:06 akirabaruah

Hi, @akirabaruah, sorry I haven't responded to your PR yet! On a quick glance, it looks good; I'll see if I can merge it with other changes I've made recently. Thanks!

JaredReisinger avatar Dec 13 '22 07:12 JaredReisinger

Sounds great 👍 lemme know if you need me to push any fresh changes

akirabaruah avatar Dec 14 '22 00:12 akirabaruah