Skip to content
This repository has been archived by the owner on Jun 21, 2020. It is now read-only.

Exporting types for dynamic styles #45

Merged
merged 1 commit into from
Jan 23, 2020
Merged

Exporting types for dynamic styles #45

merged 1 commit into from
Jan 23, 2020

Conversation

kylerjensen
Copy link
Contributor

This commit adds exports for 3 useful type declarations: DynamicViewStyle, DynamicTextStyle, and DynamicImageStyle. Exporting these types provides for better code completion when creating an instance of one of these styles. Example usage:

const stylesheet = new DynamicStyleSheet({
    myViewStyle: {
      backgroundColor: new DynamicValue('#FFFFFF', '#000000')
    } as DynamicViewStyle,
    myTextStyle: {
      // ...
    } as DynamicTextStyle,
    myImageStyle: {
      // ...
    } as DynamicImageStyle
});

This commit adds exports for 3 useful type declarations: `DynamicViewStyle`, `DynamicTextStyle`, and `DynamicImageStyle`. Exporting these types provides for better code completion when creating an instance of one of these styles. Example usage:

```typescript
const stylesheet = new DynamicStyleSheet({
    myViewStyle: {
      backgroundColor: new DynamicValue('#FFFFFF', '#000000')
    } as DynamicViewStyle,
    myTextStyle: {
      // ...
    } as DynamicTextStyle,
    myImageStyle: {
      // ...
    } as DynamicImageStyle
});
@DimitarNestorov DimitarNestorov merged commit b57ec3e into codemotionapps:master Jan 23, 2020
@DimitarNestorov
Copy link
Contributor

0.2.2 released

@kylerjensen kylerjensen deleted the patch-1 branch January 23, 2020 15:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants