-
Notifications
You must be signed in to change notification settings - Fork 53
Conversation
@@ -19,7 +19,7 @@ class Button extends UIComponent<any, any> { | |||
|
|||
public static rules = buttonRules | |||
|
|||
public static variables = buttonVariables | |||
public static variables: (x) => IButtonVariables = buttonVariables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed all static rules and variables in #16. We're breaking that PR down into several smaller PRs, however, there will be no more static rules/variables in any components moving forward.
|
||
export default { | ||
root: ({ | ||
props: { atMention, disabled, error, size, important, success, timestamp, truncated }, | ||
variables: v, | ||
}: TextRulesParams) => ({ | ||
}: any) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also changed in #16, there will be a break out PR that introduces proper baseline typings for styles.
export const felaRenderer = createRenderer(createRendererConfig()) | ||
export const felaRtlRenderer = createRenderer(createRendererConfig({ isRtl: true })) | ||
export const felaRenderer: IRenderer = createRenderer(createRendererConfig()) | ||
export const felaRtlRenderer: IRenderer = createRenderer(createRendererConfig({ isRtl: true })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also a change that has been implemented in #16 while updating typings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, let me close this PR and wait for #16 to be merged. |
I've realized that TypeScript compiler generates wrong import paths for some of the types: rules and variables. This happens because we use implicit import for static properties and compiler inlines import statements.
To avoid this, we have to explicitly specify the type of the rules and/or variables or remove typing for such properties, if it is more appropriate.