-
Notifications
You must be signed in to change notification settings - Fork 14
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
Usability improvements for "style" #55
Labels
enhancement
New feature or request
Comments
shirakaba
changed the title
[v1] Usability improvements for "style"
Usability improvements for "style"
Jul 14, 2020
Funny I was looking at Styled Components and thought of a way I'd used them with RNS. |
As for strongly-typed style objects (à la React Native's import type { RNSStyle } from "react-nativescript";
type RNSStyleSheet<T extends {}> = {
[P in keyof T]: RNSStyle;
}
export const createStyleSheet = <T extends {}>(arg: RNSStyleSheet<T>): RNSStyleSheet<T> => arg; |
RNS v2.2.0 now implements a provisional Accepting an array of styles is not yet supported, but now that I've fixed a styles issue, it may be not far off being implemented. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should accept an array of styles (like React Native), and should not throw an error if an
undefined
style is passed in (because we've marked it as optional).Should probably also be added to the typings of ViewBase so that it comes up in, e.g. FlexboxAttributes.
The text was updated successfully, but these errors were encountered: