Skip to content

Commit

Permalink
Merge branch 'next' into deprecated-icons-codemod
Browse files Browse the repository at this point in the history
  • Loading branch information
martimalek committed Aug 29, 2023
2 parents 6b46750 + 0c6c9ab commit fbf05d6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CloseIcon } from '@freenow/wave';

export const CloseIconWrapper = () => (
<CloseIcon data-testid="dismissBanner" color="var(--wave-b-color-white)" cursor="pointer" size={18} />
<CloseIcon data-testid="dismissBanner" color={'var(--wave-b-color-white)'} cursor="pointer" size={18} />
);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const GhostIcon = () => (
<svg fill="none" viewBox="0 0 16 16" width="100%">
<path d="M1 6v9h1v1h2v-1h1v-1h1v1h1v1h2v-1h1v-1h1v1h1v1h2v-1h1V6h-1V3h-1V2h-1V1h-2V0H6v1H4v1H3v1H2v3H1z" />
<path fill="var(--wave-b-color-blue-primary-1100)" d="M5 7h1v3H5zm5 0h1v3h-1z" />
<path fill="var(--wave-b-color-white)" d="M5 6h1v1H5zm5 0h1v1h-1z" />
<path fill={'var(--wave-b-color-blue-primary-1100)'} d="M5 7h1v3H5zm5 0h1v3h-1z" />
<path fill={'var(--wave-b-color-white)'} d="M5 6h1v1H5zm5 0h1v1h-1z" />
</svg>
);
2 changes: 0 additions & 2 deletions src/codemods/__tests__/block-to-width-100-test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// import { defineTest } from 'jscodeshift/dist/testUtils'

jest.autoMockOff();
const { defineTest } = require('jscodeshift/dist/testUtils');

Expand Down
6 changes: 4 additions & 2 deletions src/codemods/block-to-width-100.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { API, FileInfo } from 'jscodeshift';
import { Options } from 'recast';

module.exports = (file: FileInfo, api: API) => {
module.exports = (file: FileInfo, api: API, options: Options) => {
const j = api.jscodeshift;
const ast = j(file.source);
const printOptions = options ?? { quote: 'single' };

const localButtonNames = [];

Expand Down Expand Up @@ -53,5 +55,5 @@ module.exports = (file: FileInfo, api: API) => {
});
});

return ast.toSource({ quote: 'single' });
return ast.toSource(printOptions);
};

0 comments on commit fbf05d6

Please sign in to comment.