'access $primary in libs from custom theme in apps - Nx

I am trying use nrwl/nx and have independent libraries.

In my main apps, i define a diferent theme for apps using material-angular.

Now i would like that lib identify automatic the theme from diferents apps.

For example:

background: map-get($primary, 50);

This variable $primary identify automatic the theme from the app that are running.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source