Skip to content

Commit

Permalink
Merge pull request #1203 from undp/develop
Browse files Browse the repository at this point in the history
Release 1.1.3
  • Loading branch information
Jura authored May 17, 2023
2 parents 88d5236 + 2dcd4e3 commit 559020f
Show file tree
Hide file tree
Showing 105 changed files with 504 additions and 3,123 deletions.
4 changes: 4 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ module.exports = {
// config.module.rules[index].options.name = 'static/media/[name].[ext]';
// }
// });
config.resolve.alias = {
...config.resolve.alias,
icons: path.resolve(__dirname, "../stories/assets/icons"),
};
// add SCSS support for CSS Modules
config.module.rules.push({
test: /\.scss$/,
Expand Down
14 changes: 7 additions & 7 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { initializeRTL } from 'storybook-addon-rtl';
// import { addParameters } from '@storybook/react'
import renderToHTML from './renderToHTML'

// include fonts globally
import '../stories/assets/scss/_fonts.scss';
// include base styling globally
import '!style-loader!css-loader!sass-loader!../stories/assets/scss/base-minimal.scss';

// initialise RTL
initializeRTL();
Expand Down Expand Up @@ -82,7 +82,7 @@ export const globalTypes = {

/**
* Function to get current language code.
*
*
* @param {*} Story renders Stories in iFrame.
* @param {*} context Current context for Addons.
* @returns Current Language Code.
Expand Down Expand Up @@ -172,28 +172,28 @@ const setDirection = (Story, options) => {

/**
* Function to set a global "accent-COLOR" class to the body.
*
*
* @param {*} Story renders Stories in iFrame.
* @param {*} context Current context for Addons.
* @returns Story with accent color processed.
*/
const setAccentClass = (Story, context) => {
let accent = context.globals.accent;
const bodyElem = document.querySelector('body');

// Remove any prexisting accent-COLOR items so we can apply the most recent
// global selection.
bodyElem.classList.forEach((item) => {
if (item.startsWith('accent-')) {
bodyElem.classList.remove(item);
}
});

if (Boolean(accent)) {
// Set accent class on body tag (the most parent of parents).
bodyElem.classList.add(`accent-${accent}`);
}

return (
<Story {...context} />
)
Expand Down
2 changes: 1 addition & 1 deletion docs/css/base-minimal-no-grid.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/css/base-minimal.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/css/components/accordion.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/css/components/bio-card.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/css/components/buttons.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/css/components/checkbox.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/css/components/chips.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/css/components/content-card.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/css/components/country-site-header.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/css/components/cta-link.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/css/components/custom-select.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/css/components/documentation.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/css/components/download-modal.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/css/components/featured-content-card.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/css/components/footer.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/css/components/global-header.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/css/components/homepage-hero.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit 559020f

Please sign in to comment.