-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Detailed description
Describe in detail the issue you're having. Is this a feature request (new component, new icon), a bug, or a general issue?
When trying to use scss import, I'm getting this:
./node_modules/carbon-addons-data-viz-react/scss/index.scss
color: $text-02;
^
Undefined variable: "$text-02".
in /media/sf_nodeapp/DCS-Dashboard/src/node_modules/carbon-addons-data-viz-react/scss/components/DataTooltip/_data-tooltip.scss (line 11, column 10)
Class just looks like this:
import {PureComponent} from 'react'
import { LineGraph } from 'carbon-addons-data-viz-react'
import 'carbon-components/scss/globals/scss/styles.scss'
import 'carbon-addons-data-viz-react/scss/index.scss'
Is this issue related to a specific component?
What did you expect to happen? What happened instead? What would you like to see changed?
Should pick up scss global variable from carbon design, but not sure why it doesn't. Carbon design scss loads fine since I have all style there.
What browser are you working in?
Chrome
What version of the Carbon Design System are you using?
carbon design: 9.79.2
carbon react: 6.98.1
What offering/product do you work on? Any pressing ship or release dates we should be aware of?
DCS Dashboard ()internal IBM software for professional writers
Steps to reproduce the issue
Use this class:
import {PureComponent} from 'react'
import { LineGraph } from 'carbon-addons-data-viz-react'
import 'carbon-components/scss/globals/scss/styles.scss'
import 'carbon-addons-data-viz-react/scss/index.scss'
export default class AccessibilityCharts extends PureComponent {
constructor(props) {
super(props)
this.state = {
lineData: [[50, new Date().getTime() - 5000],[40, new Date().getTime() - 4000],[30, new Date().getTime() - 3000],[10, new Date().getTime()]]
}
}
render() {
return <LineGraph xAxisLabel="" yAxisLabel="" seriesLabels={['Violation', 'Potential violation', 'Recommendation', 'Potential recommendation', 'Manual']}
showLegend={true} drawLine={false} animateAxes={false} data={this.state.lineData}
isUTC={true} showTooltip={true} />
}
}
Shows fine without
import 'carbon-components/scss/globals/scss/styles.scss'
import 'carbon-addons-data-viz-react/scss/index.scss'
I have imported carbon-components/scss/globals/scss/styles.scss in my header file
Additional information
Without import
With import
I know I probably did something wrong, but not sure why. I'm using next.js 8 with next-sass plugin, which works perfectly fine for carbon design components

