diff --git a/CHANGELOG.md b/CHANGELOG.md index c4c8b4428..7ba426694 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Reactist follows [semantic versioning](https://semver.org/) and doesn't introduce breaking changes (API-wise) in minor or patch releases. However, the appearance of a component might change in a minor or patch release so keep an eye on redesigns and make sure your app still looks and feels like you expect it. +# v23.2.0 + +- [Feat] Add `medium` as a `weight` option for `Header`. + # v23.1.0 - [Feat] Add `--reactist-font-family-monospace` with updated font family for monospace elements diff --git a/package-lock.json b/package-lock.json index 2fae08e8f..bdfd0e62e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@doist/reactist", - "version": "23.1.0", + "version": "23.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@doist/reactist", - "version": "23.1.0", + "version": "23.2.0", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 2f8dd514f..fb9869c3a 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "email": "henning@doist.com", "url": "http://doist.com" }, - "version": "23.1.0", + "version": "23.2.0", "license": "MIT", "homepage": "https://github.com/Doist/reactist#readme", "repository": { diff --git a/src/heading/heading.module.css b/src/heading/heading.module.css index 7230bb1fe..aee2b4605 100644 --- a/src/heading/heading.module.css +++ b/src/heading/heading.module.css @@ -4,6 +4,10 @@ font-family: var(--reactist-font-family); } +.weight-medium { + font-weight: var(--reactist-font-weight-medium); +} + .weight-light { font-weight: var(--reactist-font-weight-regular); } diff --git a/src/heading/heading.stories.tsx b/src/heading/heading.stories.tsx index 1ce15c92f..1dec4f5df 100644 --- a/src/heading/heading.stories.tsx +++ b/src/heading/heading.stories.tsx @@ -128,7 +128,7 @@ export function HeadingPlaygroundStory(props: React.ComponentProps { expect(textElement).not.toHaveClass('weight-regular') expect(textElement).not.toHaveClass('weight-light') + rerender( + + Heading + , + ) + expect(textElement).toHaveClass('weight-medium') + rerender( Heading diff --git a/src/heading/heading.tsx b/src/heading/heading.tsx index ef970268a..3a36f1b5b 100644 --- a/src/heading/heading.tsx +++ b/src/heading/heading.tsx @@ -21,11 +21,11 @@ type HeadingProps = SupportedHeadingElementProps & { */ level: HeadingLevel /** - * The weight of the heading. Used to de-emphasize the heading visually when using 'light'. + * The weight of the heading. Used to de-emphasize the heading visually when using 'medium' or 'light'. * * @default 'regular' */ - weight?: 'regular' | 'light' + weight?: 'regular' | 'medium' | 'light' /** * Shifts the default heading visual text size up or down, depending on the original size * imposed by the `level`. The heading continues to be semantically at the given level.