Skip to content

Tags: dylanmoz/glamorous

Tags

v3.25.0

Toggle v3.25.0's commit message
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.

v3.24.0

Toggle v3.24.0's commit message
fix: some built-in components will now get the right props as CSS (pa…

…ypal#246)

* fix: some built-in components will now get the right props as CSS

closes paypal#245

* chore: upgrade things

v3.23.5

Toggle v3.23.5's commit message
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

v3.23.4

Toggle v3.23.4's commit message
fix(typescript): Corrects the type for the withTheme higher order com…

…ponent (paypal#190)

v3.23.3

Toggle v3.23.3's commit message
fix(compat): improve react version detection (paypal#189)

v3.23.2

Toggle v3.23.2's commit message
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`.

v3.23.1

Toggle v3.23.1's commit message
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.

v3.23.0

Toggle v3.23.0's commit message
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.

v3.22.1

Toggle v3.22.1's commit message
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.

v3.22.0

Toggle v3.22.0's commit message
feat(withComponent): add withComponent api (paypal#168)

* feat(glamororus): withComponent support

Closes paypal#135

* test(withComponent): add more test for with-commponent