Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:10up/block-components into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Aug 19, 2024
2 parents 946def3 + 1aafdfc commit f1a8374
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Whenever a PR gets merged into the `develop` branch, a GitHub Action runs that w

### Deploying `patch`, `minor`, or `major` versions

Whenever a new `patch`, `minor`, or `major` version of the package should get released, the code first needs to get merged into the `trunk` branch. Once the code is on the `trunk` brach you need to head to the `Actions` tab in the repository and select the [`Publish new version to NPM`](https://github.com/10up/block-components/actions/workflows/release-npm-version.yml) Action in the sidebar.
Whenever a new `patch`, `minor`, or `major` version of the package should get released, the code first needs to get merged into the `trunk` branch. Once the code is on the `trunk` branch you need to head to the `Actions` tab in the repository and select the [`Publish new version to NPM`](https://github.com/10up/block-components/actions/workflows/release-npm-version.yml) Action in the sidebar.

![GitHub Actions Window](./images/release-action-page.png)

Expand Down
2 changes: 1 addition & 1 deletion components/is-admin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface IsAdminProps {
/*
* IsAdmin
*
* A wrapper component that checks wether the current user has admin capabilities
* A wrapper component that checks whether the current user has admin capabilities
* and only returns the child components if the user is an admin. You can pass a
* fallback component via the fallback prop.
*/
Expand Down
2 changes: 1 addition & 1 deletion components/media-toolbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface MediaToolbarProps {
onRemove: (event: React.MouseEvent<HTMLButtonElement>) => void;

/**
* Wether or not the Remove Image button should be shown.
* Whether or not the Remove Image button should be shown.
*/
isOptional?: boolean;

Expand Down
2 changes: 1 addition & 1 deletion components/rich-text-character-limit/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ https://user-images.githubusercontent.com/20684594/195820053-dcc05c91-b5bc-45db-



`RichTextCharacterLimit` extends `RichText` and can accept all the same props as `RichText` does. Please reffer to the [official RichText documentation](https://developer.wordpress.org/block-editor/reference-guides/richtext/).
`RichTextCharacterLimit` extends `RichText` and can accept all the same props as `RichText` does. Please refer to the [official RichText documentation](https://developer.wordpress.org/block-editor/reference-guides/richtext/).

## Usage

Expand Down
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Example

This Example is a simple WordPress Plugin that shows some of the block components in use in an actuall block.
This Example is a simple WordPress Plugin that shows some of the block components in use in an actual block.
It is setup with @wordpress/env to that you can start a clean WordPress environment with this plugin by running `npm run wp-env start`. In order to build the blocks that are included in this plugin you need to run `npm run build` or if you want to watch for changes `npm run start`.

The environment will be available under [http://localhost:8888](http://localhost:8888) and the credentials to login to the admin are: `admin` `password`
4 changes: 2 additions & 2 deletions example/src/extensions/background-pattern/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ if ( ! hasBackgroundPattern ) {
return;
}

const backgroundPatternColorClassName = `has-${backgroundPatternColor}-background-patern-color`;
const backgroundPatternShapeClassName = `has-${backgroundPatternShape}-background-patern-shape`;
const backgroundPatternColorClassName = `has-${backgroundPatternColor}-background-pattern-color`;
const backgroundPatternShapeClassName = `has-${backgroundPatternShape}-background-pattern-shape`;

return `has-background-pattern ${backgroundPatternColorClassName} ${backgroundPatternShapeClassName}`;

Expand Down
4 changes: 2 additions & 2 deletions hooks/use-primary-term/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useSelect } from '@wordpress/data';
import { __ } from '@wordpress/i18n';
import { store as coreStore } from '@wordpress/core-data';
import type { WP_REST_API_Taxonomy } from 'wp-types';
import type { WP_REST_API_Term } from 'wp-types';
import { usePost } from '../use-post';
import { useIsPluginActive } from '../use-is-plugin-active';
import { useIsSupportedTaxonomy } from '../use-is-supported-taxonomy';
Expand Down Expand Up @@ -64,7 +64,7 @@ export const usePrimaryTerm = (taxonomyName: string) => {
}

const { getEntityRecord } = select(coreStore);
return getEntityRecord<WP_REST_API_Taxonomy>('taxonomy', taxonomyName, primaryTermId);
return getEntityRecord<WP_REST_API_Term>('taxonomy', taxonomyName, primaryTermId);
},
[primaryTermId],
);
Expand Down

0 comments on commit f1a8374

Please sign in to comment.