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

No shadows in web #1206

Open
m4tf3r opened this issue May 22, 2020 · 5 comments
Open

No shadows in web #1206

m4tf3r opened this issue May 22, 2020 · 5 comments
Labels
documentation question stale This ticket may be old, or may no longer be valid, and will be closed if no further activity occurs

Comments

@m4tf3r
Copy link

m4tf3r commented May 22, 2020

Hello, I tried to put shadow around RX.View and RX.Button, with:
style={{shadowOpacity: 1, shadowRadius: 10, shadowColor: 'black', shadowOffset: {width: 10, height: 10}}}
but no shadow is displayed in the browser (I only tested web for now).
ReactXP version is 2.0.0. Using inspector in the browser (tried Firefox and Chromium) I cannot find any css property regarding shadows on the View or Button that should have them.

@m4tf3r
Copy link
Author

m4tf3r commented Jun 3, 2020

Is it a bug? I tried with a project created with create-rx-app and also with the TodoList example but no shadows anyway.

@catalinmiron
Copy link

You need to use RX.Styles.createViewStyle({}) or RX.Styles.createButtonStyle({}) to apply styles.

@m4tf3r
Copy link
Author

m4tf3r commented Jun 19, 2020

Thank you, it works doing as you say. However if ReactXP styles are meant to be defined with those functions, shouldn't style properties only accept types produced by them? It is misleading that the type system gives no error when passing shadow properties in a plain object, if they can't work like that.

@fbartho
Copy link
Contributor

fbartho commented Jul 22, 2020

@m4tf3r -- the "plain object" passing is an escape hatch I believe -- if you want strongly typed styles, you can do that using RX.Styles.create*Style

I could be wrong here though, maybe @mikehardy can explain better?

@fbartho fbartho added documentation question stale This ticket may be old, or may no longer be valid, and will be closed if no further activity occurs labels Aug 9, 2020
@fbartho
Copy link
Contributor

fbartho commented Aug 9, 2020

I'm not sure if there's an action item for ReactXP here -- what do we need to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation question stale This ticket may be old, or may no longer be valid, and will be closed if no further activity occurs
Projects
None yet
Development

No branches or pull requests

3 participants