Search code examples
javascriptreactjsblueprintjs

How do I use Colors in BlueprintJS?


At the top of my react file I include the following:

import { Colors } from '@blueprintjs/core';

How do I go from this point on to using the colors such as @blue3?

const homeStyle = {
 background: '@blue2';
};

This doesn't seem to work.


Solution

  • Colors exported as a single object, so to access it, you should do:

    const homeStyle = {
       background: Colors.BLUE3;
    };