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

Having an error with loading css of this lib in Next #11

Closed
SpaceHolderdJs opened this issue Jul 11, 2023 · 4 comments
Closed

Having an error with loading css of this lib in Next #11

SpaceHolderdJs opened this issue Jul 11, 2023 · 4 comments

Comments

@SpaceHolderdJs
Copy link

Tried differently, but no luck. I am sure it`s possible to solve, any ideas ?

image

P.S this is how I used it in the component

image
@SpaceHolderdJs
Copy link
Author

And for sure there is all needed files installed in node_module via yarn

@SpaceHolderdJs
Copy link
Author

import React, { PropsWithChildren, FC } from "react";
import { DeviceFrameset } from "react-device-frameset";
import "react-device-frameset/dist/styles/marvel-devices.min.css";

interface Props extends PropsWithChildren {
    device: string;
}

export const DeviceFrame: FC<Props> = ({ children, device }) => {
    return (
        <div>
            <DeviceFrameset
                style={{ width: "300px", height: "400px" }}
                device={device as never}
            >
                {children}
            </DeviceFrameset>
        </div>
    );
};

@zheeeng
Copy link
Owner

zheeeng commented Jul 12, 2023

try import 'react-device-frameset/styles/marvel-devices.min.css'?

@SpaceHolderdJs
Copy link
Author

Perfect, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants