-
Notifications
You must be signed in to change notification settings - Fork 124
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
Add web stub for this package #70
Comments
+1 i don't have the skill to help, but i also need this feature |
Implementation can be implemented with css clip path, because all browsers support css clip path with inline svg |
This works better for me: import React from 'react';
import { View } from 'react-native';
function MaskedViewWeb({ maskElement, ...props }) {
return React.createElement(View, props, maskElement);
}
export default MaskedViewWeb; |
Hello, everyone, i just used css - inset- !!!!!!
not in
const inset = `inset(0 0 0 ${val}%)`;
const inlineStyles = {clipPath: inset, WebkitClipPath: inset};
<Wrapper>
<Back>
Upload {val}%
</Back>
<Front style={inlineStyles}>
Upload {val}%
</Front>
</Wrapper> const Back = styled.div`
background: red;
color: white;
width: 100%;
height: 100%;
align-items: center;
display: flex;
justify-content: center;
`;
const Front = styled.div`
height: 50px;
position: absolute;
top: 0;
text-align: center;
width: 100%;
background: white;
color: red;
clip-path: inset(0 0 0 0);
transition: clip-path 0.3s ease-in;
align-items: center;
display: flex;
justify-content: center;
`; |
Feature request
It would be nice to add a web stub implementation for this package based on react-native-web
Possible implementation
I haven't dived in much how the actual implementation can be, however, a stub based on normal
<View />
could be suffice I suppose.Code sample
The text was updated successfully, but these errors were encountered: