Tags: dylanmoz/glamorous
Tags
feat(getGlamorClassName): use glamor's internal style caching (paypal… …#254) * feat(getGlamorClassName): use glamor's internal style caching By shaping the string class names beginning with 'css-' we can just give the resulting object to glamor. This offloads almost the entire workload to glamor from glamorous. Another benefit is that now there will be at most one css-[hash] class name on an element. * Add a comment describing the black magic of glamor.
fix(deps): Update react version in peer dependency requirement to inc… …lude react>=0.14 (paypal#200) * fix(deps): Update react version in peer dependency requirement to include react>=0.14 (allowing for paypal#199 * chore(contributors): add `bug` for @majapw
fix(typescript): Corrects the type for the withTheme higher order com… …ponent (paypal#190)
fix(theme): swap custom theme code with `withTheme` (paypal#184) **What**: This changes the GlamorousComponent from a class to a function that uses `withTheme`. **Why**: This simplifies the codebase and prepares us for potentially dropping our own theming implementation in favor of the `theming` module. **How**: Refactoring `withTheme` to have all the features that the glamorous component had and wrapping the glamorous component in `withTheme`.
fix(css): improve built-in support with css prop as function (paypal#181 ) * chore: refactor getGlamorClassName * fix(css): improve built-in support with css prop as function **What**: This refactors things a bit and separates `css` the prop from the overrides props. **Why**: Otherwise, if the `css` prop happens to be a function, the `propsAreCssOverrides` would make the props be assigned to the function and then they'd never actually be applied. By splitting them from each other it allows us to merge both of them. **How**: Most of the work happened in `get-glamor-classname.js`. I first refactored it to simplify things a bit. Then I plugged in the `cssProp` and `cssOverrides` into their order of precidence. I also added a bit of recursion to the `handleStyles` function which allows you to pass an array of functions, this is useful for the `css` prop in particular. So you can compose functions together without a `compose` helper.
feat(css): allow the `css` prop to accept fns and strings (paypal#171) **What**: Closes paypal#170 **Why**: enables code reuse and potentially "Ahead of Time compilation" **How**: - Reusing the same logic for `cssOverrides` as we use for `styles` in `get-glamor-classname.js`. Tiny refactor there. - Adding tests to cover all the cases for the API.
fix(dependencies): Shifted doctoc to dev dependencies (paypal#169) The doctoc dependency introduced quite a few transitive dependencies, as it is only used to generate the readme it should be a dev dependency.
feat(withComponent): add withComponent api (paypal#168) * feat(glamororus): withComponent support Closes paypal#135 * test(withComponent): add more test for with-commponent
PreviousNext