diff --git a/scripts/compile-scss.js b/scripts/compile-scss.js index 23d9360e5a5..c8dcf9b74e7 100755 --- a/scripts/compile-scss.js +++ b/scripts/compile-scss.js @@ -26,7 +26,7 @@ const postcssConfigurationWithMinification = { async function compileScssFiles( sourcePattern, destinationDirectory, - packageName + packageName, ) { try { await mkdir(destinationDirectory); @@ -134,5 +134,6 @@ if (require.main === module) { process.exit(1); } - compileScssFiles(path.join('src', 'theme_*.scss'), 'dist', euiPackageName); + compileScssFiles(path.join('src/themes/legacy', 'legacy_*.scss'), 'dist', euiPackageName); + compileScssFiles(path.join('src/themes/amsterdam', 'theme_*.scss'), 'dist', euiPackageName); } diff --git a/src-docs/src/components/codesandbox/link.js b/src-docs/src/components/codesandbox/link.js index 68bc61e8f0c..df3622d28ff 100644 --- a/src-docs/src/components/codesandbox/link.js +++ b/src-docs/src/components/codesandbox/link.js @@ -5,6 +5,9 @@ import { hasDisplayToggles, listExtraDeps, } from '../../services'; +import { LEGACY_NAME_KEY } from '../../../../src/themes'; + +import { ThemeContext } from '../with_theme'; const pkg = require('../../../../package.json'); @@ -26,7 +29,6 @@ const getVersion = (packageName) => { * 5. Through regex we read the dependencies of both `content` and `display_toggles` and pass that to CS. * 6. We pass the files and dependencies as params to CS through a POST call. * */ -import { ThemeContext } from '../with_theme'; const displayTogglesRawCode = require('!!raw-loader!../../views/form_controls/display_toggles') .default; @@ -49,11 +51,11 @@ export const CodeSandboxLinkComponent = ({ }) => { let cssFile; switch (context.theme) { - case 'amsterdam-light': - cssFile = '@elastic/eui/dist/eui_theme_amsterdam_light.css'; + case `${LEGACY_NAME_KEY}_light`: + cssFile = '@elastic/eui/dist/eui_legacy_light.css'; break; - case 'amsterdam-dark': - cssFile = '@elastic/eui/dist/eui_theme_amsterdam_dark.css'; + case `${LEGACY_NAME_KEY}_dark`: + cssFile = '@elastic/eui/dist/eui_legacy_dark.css'; break; case 'dark': cssFile = '@elastic/eui/dist/eui_theme_dark.css'; diff --git a/src-docs/src/components/guide_theme_selector/guide_figma_link.tsx b/src-docs/src/components/guide_theme_selector/guide_figma_link.tsx index ff372274bf1..6d3336b46de 100644 --- a/src-docs/src/components/guide_theme_selector/guide_figma_link.tsx +++ b/src-docs/src/components/guide_theme_selector/guide_figma_link.tsx @@ -28,13 +28,13 @@ const GuideFigmaLinkComponent: React.FunctionComponent = ({ }) => { const isMobileSize = useIsWithinBreakpoints(['xs', 's']); - const isAmsterdam = context.theme.includes('amsterdam'); + const isLegacy = context.theme.includes('legacy'); - let href = 'https://www.figma.com/community/file/809845546262698150'; + let href = 'https://www.figma.com/community/file/964536385682658129'; const label = 'EUI Figma Design Library'; - if (isAmsterdam) { - href = 'https://www.figma.com/community/file/964536385682658129'; + if (isLegacy) { + href = 'https://www.figma.com/community/file/809845546262698150'; } return isMobileSize ? ( @@ -49,7 +49,6 @@ const GuideFigmaLinkComponent: React.FunctionComponent = ({