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

import { ShadowFlex } from 'react-native-neomorph-shadows'; #49

Open
lucas-dd opened this issue Jun 21, 2021 · 2 comments
Open

import { ShadowFlex } from 'react-native-neomorph-shadows'; #49

lucas-dd opened this issue Jun 21, 2021 · 2 comments

Comments

@lucas-dd
Copy link

lucas-dd commented Jun 21, 2021

Do you guys a flex example:

as I'm trying it and give me an error when code compiles

 <ShadowFlex style={styles.shadow}>
  shadow: {

    flexDirection: 'row',
    justifyContent: 'space-around',
    marginBottom: 32,
    marginLeft: 16,
    marginRight: 16,
    borderRadius: 20,
    shadowOffset: {
      width: 4,
      height: 4,
    },
    shadowOpacity: 1,
    shadowColor: colours.SHADOW_DARK,
    shadowRadius: 4,
    backgroundColor: colours.BASIC200,
  },
 ERROR  Warning: Failed prop type: The prop `style.width` is marked as required in `OuterShadow`, but its value is `undefined`.
@lucas-dd
Copy link
Author

can you please just modify this line :

  interface ShadowFlexProps extends ViewProps {
    inner?: boolean;
    useArt?: boolean;
    style?: ViewStyle;
  }

or help me to raise a PR

@lucas-dd
Copy link
Author

lucas-dd commented Jun 22, 2021

I am also thinking that those two lines needs changes in order to adapt the flex component

 width: number.isRequired,
    height: number.isRequired,
export const InnerShadowType = {
  ...ViewPropTypes,
  children: node,
  style: shape({
    ...ViewPropTypes.style,
    width: number.isRequired,
    height: number.isRequired,
  }),
};

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

1 participant