-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[charts] Fix
ChartsTooltip
component setup (#11157)
- Loading branch information
Showing
14 changed files
with
103 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
packages/x-charts/src/ChartsTooltip/chartsTooltipClasses.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { | ||
unstable_generateUtilityClass as generateUtilityClass, | ||
unstable_generateUtilityClasses as generateUtilityClasses, | ||
} from '@mui/utils'; | ||
|
||
export interface ChartsTooltipClasses { | ||
/** Styles applied to the root element. */ | ||
root: string; | ||
/** Styles applied to the table element. */ | ||
table: string; | ||
/** Styles applied to the row element. */ | ||
row: string; | ||
/** Styles applied to the cell element. */ | ||
cell: string; | ||
/** Styles applied to the mark element. */ | ||
mark: string; | ||
/** Styles applied to the markCell element. */ | ||
markCell: string; | ||
/** Styles applied to the labelCell element. */ | ||
labelCell: string; | ||
/** Styles applied to the valueCell element. */ | ||
valueCell: string; | ||
} | ||
|
||
export type ChartsTooltipClassKey = keyof Omit< | ||
ChartsTooltipClasses, | ||
// these classes are not used for styled components | ||
'markCell' | 'labelCell' | 'valueCell' | ||
>; | ||
|
||
export function getChartsTooltipUtilityClass(slot: string) { | ||
return generateUtilityClass('MuiChartsTooltip', slot); | ||
} | ||
export const chartsTooltipClasses: ChartsTooltipClasses = generateUtilityClasses( | ||
'MuiChartsTooltip', | ||
['root', 'table', 'row', 'cell', 'mark', 'markCell', 'labelCell', 'valueCell'], | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './ChartsTooltip'; | ||
export * from './chartsTooltipClasses'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters