Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
Signed-off-by: sirugh <rugh@adobe.com>
  • Loading branch information
sirugh committed Nov 4, 2020
1 parent 5f75e4b commit 456a831
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
14 changes: 10 additions & 4 deletions packages/venia-concept/local-intercept.js
Expand Up @@ -21,13 +21,19 @@ const { Targetables } = require('@magento/pwa-buildpack');
function localIntercept(targets) {
const myTheme = Targetables.using(targets);

const button = myTheme.reactComponent('@magento/venia-ui/lib/components/Button/button.js');
const button = myTheme.reactComponent(
'@magento/venia-ui/lib/components/Button/button.js'
);

const CustomButton = button.addImport("CustomButton from '@magento/venia-concept/src/CustomButton/CustomButton.js'");
button.replaceJSX('button', `<${CustomButton} className={rootClassName} type={type} disabled={disabled} {...restProps}>{children}</${CustomButton}>`);
const CustomButton = button.addImport(
"CustomButton from '@magento/venia-concept/src/CustomButton/CustomButton.js'"
);
button.replaceJSX(
'button',
`<${CustomButton} className={rootClassName} type={type} disabled={disabled} {...restProps}>{children}</${CustomButton}>`
);

// etc for all other things you might want to customize with your theme...
}


module.exports = localIntercept;
4 changes: 2 additions & 2 deletions packages/venia-concept/src/CustomButton/CustomButton.js
Expand Up @@ -29,9 +29,9 @@ const CustomButton = props => {
loadCss();
}

async function loadCss () {
async function loadCss() {
const dynamicCss = await import('./frenchButton.css');
setCss(dynamicCss.default)
setCss(dynamicCss.default);
}
}, [storeCode]);

Expand Down

0 comments on commit 456a831

Please sign in to comment.