This repository was archived by the owner on Oct 20, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-12
lines changed
Expand file tree Collapse file tree 3 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 1- export default {
1+ export default ( { a11yColors = false } ) => ( {
22 // BRAND
33 brandBlue : '#00C8F5' ,
44 brandGreen : '#D2F500' ,
@@ -30,8 +30,8 @@ export default {
3030
3131 // FUNCTIONAL COLOURS FOR PRODUCT DEVELOPMENT
3232
33- cta : '#0046FF' ,
34- positive : '#00D200' ,
35- negative : '#FF1900' ,
36- index : '#FFCF00' ,
37- } ;
33+ cta : a11yColors ? '#2D67FF' : '#0046FF' ,
34+ positive : a11yColors ? '#008A00' : '#00D200' ,
35+ negative : a11yColors ? '#E81700' : '#FF1900' ,
36+ index : a11yColors ? '#FFCF00' : '#C15700 ',
37+ } ) ;
Original file line number Diff line number Diff line change 1- import color from './color' ;
2-
3- export default function createPalette ( { type = 'light' } ) {
4- const palette = { ...color } ;
1+ import createColor from './color' ;
52
3+ export default function createPalette ( { type = 'light' , a11yColors = false } ) {
64 const proxyIsAvailable = typeof window !== 'undefined' ? 'Proxy' in window : true ;
75
86 if ( ! proxyIsAvailable ) {
7+ const palette = { ...createColor ( { a11yColors } ) } ;
98 return palette ;
109 }
1110
@@ -26,7 +25,7 @@ export default function createPalette({ type = 'light' }) {
2625 return {
2726 name : 'nordnet' ,
2827 type,
29- ...color ,
28+ ...createColor ( { a11yColors } ) ,
3029 color : pinkProxieFactory ( '.color' ) ,
3130 variant : pinkProxieFactory ( '.variant' ) ,
3231 // text: pinkProxieFactory('').text,
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import createMixins from './mixins';
99
1010export function createTheme ( config = { } ) {
1111 const {
12- palette = createPalette ( { type : 'dark' } ) ,
12+ palette = createPalette ( { type : 'dark' , a11yColors : config . a11yColors } ) ,
1313 breakpoints = createBreakpoints ( ) ,
1414 mixins = createMixins ( breakpoints ) ,
1515 typography = createTypography ( ) ,
You can’t perform that action at this time.
0 commit comments