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

The text shadow of the text component created by creatText does not take effect #307

Open
1 of 2 tasks
tenglonghh opened this issue Aug 27, 2024 · 1 comment
Open
1 of 2 tasks
Labels
bug Something isn't working

Comments

@tenglonghh
Copy link

Current behavior

Expected behavior

The text shadow of the text component created by creatText does not take effect

To Reproduce

Platform:

  • iOS
  • Android

Environment

2.4.2

x.y.z

@tenglonghh tenglonghh added the bug Something isn't working label Aug 27, 2024
@IliasHad
Copy link

  1. Create a text component
export const Text = createText<Theme>();
  1. Import and use your text component
          <Text
            textShadowRadius={5}
            textShadowColor="mainBackground"
            textShadowOffset={{
              width: 10,
              height: 10,
            }}
          >
            Test
          </Text>

and make sure the mainBackgroundis defined in theme.tsx file

// theme.tsx

const palette = {
  purpleLight: '#8C6FF7',
  purplePrimary: '#5A31F4',
  purpleDark: '#3F22AB',

  greenLight: '#56DCBA',
  greenPrimary: '#0ECD9D',
  greenDark: '#0A906E',

  black: '#0B0B0B',
  white: '#F0F2F3',
};

const theme = createTheme({
  colors: {
    mainBackground: palette.white,
    mainForeground: palette.black,
    cardPrimaryBackground: palette.purplePrimary,
    buttonPrimaryBackground: palette.purplePrimary,
  },
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants