Skip to content

Commit 785c0ee

Browse files
authored
fix(components, app, opentrons-ai-client): fix global.css import issue (#19013)
* fix(components, app, opentrons-ai-client): fix global.css import issue
1 parent 3b3e87c commit 785c0ee

File tree

12 files changed

+18
-12
lines changed

12 files changed

+18
-12
lines changed

app/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import '../src/atoms/SoftwareKeyboard/AlphanumericKeyboard'
1515
import '../src/atoms/SoftwareKeyboard/FullKeyboard/index.css'
1616
import '../src/atoms/SoftwareKeyboard/IndividualKey/index.css'
1717
import '../src/atoms/SoftwareKeyboard/NumericalKeyboard/index.css'
18-
import '@opentrons/components/styles'
18+
import '@opentrons/components/styles/global'
1919

2020
// export public types so they can be accessed by external deps
2121
export * from './redux/types'

app/vite.config.mts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ export default defineConfig(
6262
},
6363
resolve: {
6464
alias: {
65+
'@opentrons/components/styles/global': path.resolve(
66+
'../components/src/styles/global.css'
67+
),
6568
'@opentrons/components/styles': path.resolve(
6669
'../components/src/index.module.css'
6770
),

components/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"main": "src/index.ts",
99
"module": "src/index.ts",
1010
"exports": {
11-
"./styles": "./src/styles/global.css"
11+
"./styles": "./src/index.module.css",
12+
"./styles/global": "./src/styles/global.css"
1213
},
1314
"repository": {
1415
"type": "git",

components/src/forms/SelectField.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '@opentrons/components/styles';
1+
@import '../index.module.css';
22

33
.select_field.error {
44
& :global(.ot_select__control) {

components/src/index.module.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
@import './styles/colors.module.css';
44
@import './styles/typography.module.css';
55
@import './styles/borders.module.css';
6-
@import './styles/global.css';
76

87
:global(*) {
98
box-sizing: border-box;

components/src/legacy-hardware-sim/ModuleItem.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '@opentrons/components/styles';
1+
@import '../index.module.css';
22

33
.module {
44
display: flex;

components/src/structure/Splash.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '@opentrons/components/styles';
1+
@import '../index.module.css';
22

33
.splash {
44
position: relative;

components/vite.config.mts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ export default defineConfig({
6161
'@opentrons/components/styles': path.resolve(
6262
'../components/src/index.module.css'
6363
),
64+
'@opentrons/components/styles/global': path.resolve(
65+
'../components/src/styles/global.css'
66+
),
6467
'@opentrons/step-generation': path.resolve(
6568
'../step-generation/src/index.ts'
6669
),

opentrons-ai-client/src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import ReactDOM from 'react-dom/client'
33
import { I18nextProvider } from 'react-i18next'
44
import { Auth0Provider } from '@auth0/auth0-react'
55

6-
import '@opentrons/components/styles'
6+
import '@opentrons/components/styles/global'
77

88
import { App } from './App'
99
import { i18n } from './i18n'

opentrons-ai-client/vite.config.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ export default defineConfig({
4848
},
4949
resolve: {
5050
alias: {
51-
'@opentrons/components/styles': path.resolve(
52-
'../components/src/index.module.css'
51+
'@opentrons/components/styles/global': path.resolve(
52+
'../components/src/styles/global.css'
5353
),
5454
'@opentrons/components': path.resolve('../components/src/index.ts'),
5555
'/ai-client/': path.resolve('./src/') + '/',

0 commit comments

Comments
 (0)