Skip to content

Commit

Permalink
feat(elements-colors): update colors preview (#13066)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: TJ Egan <tw15egan@gmail.com>
  • Loading branch information
3 people authored Feb 9, 2023
1 parent 8edafa0 commit 64d1c96
Show file tree
Hide file tree
Showing 9 changed files with 1,964 additions and 5,141 deletions.
15 changes: 0 additions & 15 deletions packages/colors/examples/preview/index.html

This file was deleted.

11 changes: 11 additions & 0 deletions packages/colors/examples/preview/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const { PHASE_PRODUCTION_BUILD } = require('next/constants')

module.exports = (phase, { defaultConfig }) => {
if (phase === PHASE_PRODUCTION_BUILD) {
return {
basePath: '/colors/examples/preview',
}
}

return defaultConfig;
}
18 changes: 9 additions & 9 deletions packages/colors/examples/preview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
"browserslist": "last 2 versions",
"source": "index.html",
"scripts": {
"build": "parcel build --dist-dir build --public-url \"/colors/examples/preview\" index.html",
"develop": "parcel index.html --no-cache"
},
"devDependencies": {
"@carbon/colors": "^10.37.1",
"@parcel/transformer-sass": "^2.0.1",
"parcel": "^2.0.1"
"develop": "next",
"build": "next build && next export -o build"
},
"dependencies": {
"react": "^16.13.1",
"react-dom": "^16.13.1"
"@carbon/colors": "link:../../",
"@carbon/styles": "link:../../../styles",
"change-case": "^4.1.1",
"next": "^10.0.7",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"sass": "^1.57.1"
}
}
9 changes: 0 additions & 9 deletions packages/colors/examples/preview/src/index.js

This file was deleted.

5 changes: 5 additions & 0 deletions packages/colors/examples/preview/src/pages/_app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import '../styles.scss';

export default function App({ Component, pageProps }) {
return <Component {...pageProps} />;
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import { colors, unstable_hoverColors } from '@carbon/colors';
import { colors, hoverColors } from '@carbon/colors';

function getHoverColor(swatch, grade) {
for (const [key, value] of Object.entries(unstable_hoverColors)) {
for (const [key, value] of Object.entries(hoverColors)) {
if (!key.includes(swatch)) {
continue;
}
Expand Down
8 changes: 8 additions & 0 deletions packages/colors/examples/preview/src/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// Copyright IBM Corp. 2018, 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.
//

@use 'styles/reset' as *;
Loading

0 comments on commit 64d1c96

Please sign in to comment.