Skip to content

Commit

Permalink
Merge branch 'main' into 9459-display-name
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] committed Sep 22, 2021
2 parents e33c706 + 1d7d399 commit 488dc0d
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/carbon-react/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import { configureActions } from '@storybook/addon-actions';
import { white, g10, g90, g100 } from '@carbon/themes';
import React from 'react';
import { breakpoints } from '@carbon/layout';
import { settings } from 'carbon-components';

settings.prefix = 'cds';

export const globalTypes = {
locale: {
Expand Down
4 changes: 3 additions & 1 deletion packages/carbon-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@
},
"sideEffects": [
"es/feature-flags.js",
"lib/feature-flags.js"
"lib/feature-flags.js",
"es/prefix.js",
"lib/prefix.js"
]
}
1 change: 1 addition & 0 deletions packages/carbon-react/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import './prefix';
import './feature-flags';

export {
Expand Down
10 changes: 10 additions & 0 deletions packages/carbon-react/src/prefix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import { settings } from 'carbon-components';

settings.prefix = 'cds';
6 changes: 6 additions & 0 deletions packages/carbon-react/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ function getRollupConfig(input) {
moduleSideEffects: true,
};
}

if (id === path.join(__dirname, '..', 'src', 'prefix.js')) {
return {
moduleSideEffects: true,
};
}
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ Object {
"css--font-face": true,
"css--plex-arabic": false,
"css--reset": true,
"prefix": "bx",
"prefix": "cds",
}
`;
2 changes: 1 addition & 1 deletion packages/styles/scss/_config.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/// @access public
/// @type String
/// @group config
$prefix: 'bx' !default;
$prefix: 'cds' !default;

/// If true, includes font face mixins in `_css--font-face.scss` depending on the `css--plex` feature flag
/// @access public
Expand Down

0 comments on commit 488dc0d

Please sign in to comment.