Skip to content

Commit

Permalink
feat(Shadow helper): initial structure
Browse files Browse the repository at this point in the history
  • Loading branch information
rapahaeru committed May 28, 2019
1 parent 9bc893b commit 21af650
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Empty file added components/shared/shadow.js
Empty file.
30 changes: 30 additions & 0 deletions components/shared/shadow.unit.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import shadow from './shadow';
import { colors } from './theme';
import hexToRgba from './hexToRgba';

describe('Shadow helper', () => {
it('should get the correct elevation style', () => {
// expect(hexToRgba('#f1c245')).toBe('rgba(241,194,69,1)');


const opacities = [0.2, 0.14, 0.12];
const { neutral: colorNeutral } = colors;
const neutralRGBA = hexToRgba(colorNeutral[700], 0.2);

opacities.map( (opacity) => console.log(hexToRgba(colorNeutral[700], opacity)))


console.log(neutralRGBA);

// expect(shadow(0)).toBe('box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12);')

// box-shadow: 0px 0px 0px 0px RGBA();
// 0px 0px 0px 0px RGBA()
// 0px 0px 0px 0px
});
});

// .mdc-elevation--z0 {
// -webkit-box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12);
// box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12);
// }

0 comments on commit 21af650

Please sign in to comment.