Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: [M3-6303] - SRC > Components > ColorPalette #9013

Merged
merged 1 commit into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs';
import ColorPalette from './ColorPalette';
import { ColorPalette } from './ColorPalette';

<Meta title="Core Styles/Color Palette" component={ColorPalette} />

Expand Down
10 changes: 4 additions & 6 deletions packages/manager/src/components/ColorPalette/ColorPalette.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// eslint-disable-next-line no-restricted-imports
import { useTheme } from '@mui/material';
import * as React from 'react';
import { makeStyles } from '@mui/styles';
import { makeStyles } from 'tss-react/mui';
import { Theme } from '@mui/material/styles';
import Typography from 'src/components/core/Typography';
import Grid from '@mui/material/Unstable_Grid2';
Expand All @@ -11,7 +11,7 @@ interface Color {
alias: string;
}

const useStyles = makeStyles((theme: Theme) => ({
const useStyles = makeStyles()((theme: Theme) => ({
root: {
'& h2': {
color: '#32363c',
Expand Down Expand Up @@ -41,8 +41,8 @@ const useStyles = makeStyles((theme: Theme) => ({
},
}));

export const ColorPalette: React.FC<{}> = () => {
const classes = useStyles();
export const ColorPalette = () => {
const { classes } = useStyles();
const theme = useTheme();

const primaryColors = [
Expand Down Expand Up @@ -197,5 +197,3 @@ export const ColorPalette: React.FC<{}> = () => {
</Grid>
);
};

export default ColorPalette;