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

feat: added optional support for angle #5559

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

proohit
Copy link

@proohit proohit commented Nov 16, 2022

Summary

Adds (optional) support for useAngle angle and angleCenter props for LinearGradient.

closes #5538

Changelog

[General] [Added] - Add support for angle props in LinearGradient

Test Plan

I've added a storybook example

export const ExampleWithAngle = () => {
  return (
    <Box
      bg={{
        linearGradient: {
          colors: ['lightBlue.300', 'violet.800'],
          useAngle: true,
          angle: 15,
          angleCenter: { x: 0.5, y: 0.5 },
        },
      }}
      p="12"
      w="72"
      rounded="xl"
      _text={{
        fontSize: 'md',
        fontWeight: 'medium',
        color: 'warmGray.50',
        textAlign: 'center',
      }}
    >
      This is a Box with Linear Gradient using angle props
    </Box>
  );
};

@auto-assign auto-assign bot requested a review from surajahmed November 16, 2022 11:53
@vercel
Copy link

vercel bot commented Nov 16, 2022

@proohit is attempting to deploy a commit to the Geekyants Team Team on Vercel.

A member of the Team first needs to authorize it.

@proohit proohit changed the base branch from master to v3 November 16, 2022 11:53
@proohit proohit changed the base branch from v3 to master November 16, 2022 11:54
@douglasscriptore
Copy link

I need this :/

@proohit
Copy link
Author

proohit commented Nov 22, 2022

Let's hope for @surajahmed or team to pick it up:)

@proohit
Copy link
Author

proohit commented Nov 23, 2022

I just realized that this does not work with expo-linear-gradient, since they use an own implementation without react-native-linear-gradient. The storybook examples however use that, so may not be able to view in storybook. Any suggestions are appreciated

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

Successfully merging this pull request may close these issues.

angle support on react-native-linear-gradient integration
2 participants