Skip to content

Commit

Permalink
feat(@morfeo/web): reset css utility prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaSimonePorceddu committed Jun 3, 2021
1 parent 41c291a commit 6695398
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/web/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Object.keys(gradientParsers).forEach(property => {
parsers.add(property as Property, gradientParsers[property] as any);
});

export * from './utils'
export * from './utils';

export * from './types';

Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './resetCss'
export * from './resetCss';
12 changes: 6 additions & 6 deletions packages/web/src/utils/resetCss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,18 +249,18 @@ textarea {
color: #000;
padding: 0.2em 0;
}
`
`;

/**
* @description
* @description
* reset base css
*
*
* @example
* ```
* import { resetCss } from '@morfeo/web':
* import { theme } from '@morfeo/core';
* import { myTheme } from './myTheme';
*
*
* resetCss();
* theme.set(myTheme)
* ```
Expand All @@ -273,6 +273,6 @@ export function resetCss() {
<style>
${cssReset}
</style>
`
`;
head.innerHTML += newStyle;
}
}
8 changes: 4 additions & 4 deletions packages/web/tests/resetCss.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { resetCss } from '../src/utils/resetCss';
describe('resetCss', () => {
test('should add the reset style element on the html head', () => {
resetCss()
expect(document.getElementsByTagName('style')).toBeTruthy();
})
})
resetCss();
expect(document.getElementsByTagName('style')).toBeTruthy();
});
});

0 comments on commit 6695398

Please sign in to comment.