Closed xuesichao closed 2 years ago
Issue #829 :
After PR https://github.com/aws/amazon-chime-sdk-component-library-react/pull/589, DefaultTheme and 'styled-components' module declaration appear in the library files. This pull requests allows defining DefaultTheme type on the application level without forcing to library structure.
Ex. Current implementation doesn't allow extending theme colors on the application level.
declare module 'styled-components' { export interface DefaultTheme { colors: { myCustomColorForAnotherLibrary: string; // TS Error: Subsequent property declarations must have the same type. Property 'colors' must be of type '{ primary: ColorType; secondary: ColorType; error: ColorType; success: ColorType; info: ColorType; warning: } } }
Testing
Have you successfully run npm run build:release locally? Yes
npm run build:release
How did you test these changes? Tested by checking running 'npm build' locally and checking 'lib' folder.
If you made changes to the component library, have you provided corresponding documentation changes? NA
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Close in favor of #829
Issue #829 :
After PR https://github.com/aws/amazon-chime-sdk-component-library-react/pull/589, DefaultTheme and 'styled-components' module declaration appear in the library files. This pull requests allows defining DefaultTheme type on the application level without forcing to library structure.
Ex. Current implementation doesn't allow extending theme colors on the application level.
Testing
Have you successfully run
npm run build:release
locally? YesHow did you test these changes? Tested by checking running 'npm build' locally and checking 'lib' folder.
If you made changes to the component library, have you provided corresponding documentation changes? NA
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.