Skip to content

Commit

Permalink
Version Packages (#83)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Jun 11, 2023
1 parent f042af5 commit 8282011
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 71 deletions.
5 changes: 0 additions & 5 deletions .changeset/fluffy-seahorses-complain.md

This file was deleted.

65 changes: 0 additions & 65 deletions .changeset/gentle-bats-report.md

This file was deleted.

67 changes: 67 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,72 @@
# corners

## 0.0.14

### Patch Changes

- 8700300: ✨ Export `interpolate` utility for drawing corners. It's a simple utility, useful for placing a point partway between two other points. (e.g., `x: interpolate(p1.x, p2.x, 0.5)`)
- 8e4172b: 💄✨ Layers created using the layers API can now include className. The idea is to make it more convenient to target layers with styling changes.

```tsx
// src/components/containers/LAYER.ts
export const LAYER: Record<string, Layer> = {
DOTTED_STROKE: {
className: "dotted-stroke", // <--- new
stroke: {
color: "black",
width: 1,
dashPattern: [2, 2],
}
}
SOFT_SPREAD_SHADOW: {
className: "soft-spread-shadow", // <--- new
shadow: {
color: "black",
spread: 2,
blur: 20,
offset: { x: 0, y: 2 },
}
}
} as const
// src/components/containers/button.ts
import Emotion from "@emotion/styled"
import { rounded } from "corners"

import { LAYER } from "./LAYER"

const styled = {
dottedStrokeButton: Emotion(
rounded.button, {
noClipping: true,
below: [
LAYER.SOFT_SPREAD_SHADOW,
LAYER.DOTTED_STROKE,
],
}
),
}
export const button = {
softDottedStroke: styled.dottedStrokeButton`
&:hover {
> svg.dotted-stroke > path { // <--- permits targeting!
// ... //
}
> svg.soft-spread-shadow > path { // <--- permits targeting!
// ... //
}
}
`
}
// src/components/Component.tsx
import { button } from "./containers/button"

const Component = () => (
<button.softDottedStroke>
This renders a {`<button>`} node with {`<svg>`} nodes inside it, sized to fit the button.
</button.softDottedStroke>
)
```

## 0.0.13

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "corners",
"version": "0.0.13",
"version": "0.0.14",
"files": [
"dist"
],
Expand Down

0 comments on commit 8282011

Please sign in to comment.