Giter Site home page Giter Site logo

Comments (7)

Ofer-Gal avatar Ofer-Gal commented on July 18, 2024

I figured this one
but I don't have CSS in the popout.
Can you explain for URL "can be used to load the CSS"?

from react-popout-v2.

sidharthancr avatar sidharthancr commented on July 18, 2024

@Ofer-Gal Create a route in the application and pass the URL. It would help you to load the CSS.

from react-popout-v2.

Ofer-Gal avatar Ofer-Gal commented on July 18, 2024

Thanks for answering.
Could you show some code for "Create a route in the application" you mean like with react-rout?
Where will the import {the CSS file} will go?
Please help.

from react-popout-v2.

sidharthancr avatar sidharthancr commented on July 18, 2024

@Ofer-Gal

What I mean by creating a route is,

  1. Create a react route for example, /popout in the router.
  2. Pass the URL in the popout component

When creating the new route in the application, the new URL loads the application with CSS and no content. Then the Children's content will be added to the popout.

from react-popout-v2.

Ofer-Gal avatar Ofer-Gal commented on July 18, 2024

So import "react-datepicker/dist/react-datepicker.css"; (for one of my components) should be added to a component in the /popout route?
I will give it a try Thanks

from react-popout-v2.

Ofer-Gal avatar Ofer-Gal commented on July 18, 2024

Wait, Can I do all the content of the child popup in the /popout route and nothing in the "children=" ?
just have

<Popout url={'/PopOut'}
  id={openJob}
  reactDom={ReactDOM}
  options={{ left: '0', top: '0', width: '800px', height: '800px', resizable: 'yes', location:'no' }}
  onClose={() => setOpen(false)} containerId={'#forPopOut'}
  title={'Request '+ openJob}
/>

Will that work? Thank you in advance

from react-popout-v2.

Ofer-Gal avatar Ofer-Gal commented on July 18, 2024

I added routes with "react-router-dom"
Using URL {'/PopOut'} did not work because there was no page like that.
Using URL {'#/PopOut'} works but it shows the entire sending page with the component inside it.
I can't figure out how to render just the component in the route

   <Route path="/PopOut" element={<PopOut />} />

What am I doing wrong?

from react-popout-v2.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.