Comments (4)
Hi, @dlomax64
I was trying to reproduce your issue and ended up with this CodeSandbox solution but it doesn't seem to solve your main problem.
In other words, you can easily extend a component style using styled-components API
import styled from "styled-components";
import { Modal } from "@react95/core";
const ExtendedModal = styled(Modal)`
z-index: 10;
`;
But extending a component wouldn't seem to be a solution for your case.
Our Modal has its active
state handled by its own Context + its own state.
The only way I can see you could achieve what you want would be by creating a new theme and changing the Modal zIndex to whichever you want. But, there is no such API for doing this.
Today, you can only choose one for a bunch of available themes. You can't build your own.
We could create a task for it. If you want to.
Would you like to contribute to it?
Although, if you could provide more details of what are you facing I would be glad to help you.
from react95.
My specific problem is that I have an animated svg on the background that the modal falls behind whenever it goes out of focus. Whenever I try to alter the modals z-index, the in-focus modal won't always appear above out of focus windows. The problem with the method you posted is that it makes the z-index for the modal 10 whether it's in focus or not.
I wonder if you could make it to where you can pass a z-index (for it's in and out of focus states) to the modal like you do with height and width. Or perhaps have an option that makes the out of focus modal's z-index always be the in-focus z-index - 1.
I've never modified a package before, so if I were to play around with that would modifying node_modules/@react95/core/@types/Modal/Modal.d.ts
be how I do it?
Thanks for the help
from react95.
I feel real silly right now. I finally determined why the windows kept falling behind my svg even though they had the same z-index. I was rendering the windows before the svg. Simply switching the order that my elements get rendered fixed it. Thanks for trying to help!
from react95.
I'm glad to know you could solve this!
But feel free to contribute with React95. I would love to discuss and help you with an issue or feature.
Thanks, @dlomax64
from react95.
Related Issues (20)
- Missing assets folder for `<GlobalStyle />`
- Clippy is undefined HOT 3
- New resource from fullscreen to the component Video
- Problems at using the React95 with next.js HOT 2
- Is it okay to use commercial, really? HOT 5
- help with installing theme(macos big sur) HOT 3
- CDN's for clippy are down HOT 7
- Failed to compile due to file React95 dependency HOT 3
- input and textfield have rounded corners on iOS HOT 2
- React version issue with latest version of Gatsby HOT 2
- TaskBar window buttons rendering double HOT 4
- theme.colors is undefined in TitleBarBackground in TitleBar.js HOT 3
- @react95/core + Nextjs: Module parse failed error HOT 1
- Why this component library? HOT 3
- can not use in latest nextjs (13.4.19) HOT 3
- Scrolling issue in storybook HOT 3
- Video player throws onChange handler error in React 18 Vite HOT 3
- Issues in Next.js 14 HOT 3
- Theme doesn't seem to apply to taskbar HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react95.