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

If you are using Material-UI components in the ui directory under the packages folder but the CSS is not being applied, how can this be fixed? #785

Open
ToBeBetter755 opened this issue Nov 19, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ToBeBetter755
Copy link

ToBeBetter755 commented Nov 19, 2024

/chrome-extension-boilerplate-react-vite/packages/ui/lib/components/Button.tsx

import type { ComponentPropsWithoutRef } from 'react';
import { cn } from '../utils';
import { Button as MuiButton } from '@mui/material';

export type ButtonProps = {
  theme?: 'light' | 'dark';
} & ComponentPropsWithoutRef<'button'>;

export function Button({ theme, className, children }: ButtonProps) {
  return (
    <MuiButton
      color="primary"
      className={cn(
        className,
        'py-1 px-4 rounded shadow hover:scale-105',
        theme === 'light' ? 'bg-white text-black' : 'bg-black text-white',
      )}
    >
      {children}
    </MuiButton>
  );
}
@ToBeBetter755 ToBeBetter755 added the bug Something isn't working label Nov 19, 2024
Copy link

Thank you for your contribution. We will check and reply to you as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants