Skip to content
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

fix(core): use css properties from csstype, do not rely on react #840

Merged
merged 1 commit into from
Jul 13, 2021

Conversation

josokinas
Copy link
Contributor

@josokinas josokinas commented Jul 13, 2021

Purpose

Because a Font type within a helper uses CSSProperties that come from React dependency, a core package also requires React even for those who do not use it (but use TS).

Approach

Instead of using CSSProperties that require to have React as a dependency even for a core package, depend directly on csstype.

Downside - introducing a dependency.

Testing

Everything should still work as previously.

Risks

N/A

@josokinas josokinas requested a review from rabelloo July 13, 2021 12:32
@josokinas josokinas self-assigned this Jul 13, 2021
@vercel
Copy link

vercel bot commented Jul 13, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/onfido-oss/castor/7eQiBfzFhGa9qmhd51mCah1a93uA
✅ Preview: https://castor-git-fix-font-interface-onfido-oss.vercel.app

Instead of using CSSProperties that require to have React as a 
dependency even for a core package,
use from csstype dependency.

fixes #811
@josokinas josokinas force-pushed the fix/font-interface branch from 7d8b5d1 to b5c4f35 Compare July 13, 2021 14:51
@josokinas josokinas changed the title fix(core): use own font interface, do not rely on react fix(core): use css properties from csstype, do not rely on react Jul 13, 2021
Copy link
Contributor

@rabelloo rabelloo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't say I'm thrilled to introduce the dependency but since it's type only it should be alright.
I'll keep an eye.

@josokinas josokinas merged commit 09e3b33 into main Jul 13, 2021
@josokinas josokinas deleted the fix/font-interface branch July 13, 2021 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants