Skip to content

Commit

Permalink
chore: fix some comments (#2956)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjtucoder authored Aug 16, 2024
1 parent 28f9868 commit 374c7d7
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/react/dialog/src/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ const DialogContentImpl = React.forwardRef<DialogContentImplElement, DialogConte
const composedRefs = useComposedRefs(forwardedRef, contentRef);

// Make sure the whole tree has focus guards as our `Dialog` will be
// the last element in the DOM (beacuse of the `Portal`)
// the last element in the DOM (because of the `Portal`)
useFocusGuards();

return (
Expand Down
2 changes: 1 addition & 1 deletion packages/react/menu/src/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ const MenuContentImpl = React.forwardRef<MenuContentImplElement, MenuContentImpl
}, []);

// Make sure the whole tree has focus guards as our `MenuContent` may be
// the last element in the DOM (beacuse of the `Portal`)
// the last element in the DOM (because of the `Portal`)
useFocusGuards();

const isPointerMovingToSubmenu = React.useCallback((event: React.PointerEvent) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/react/popover/src/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ const PopoverContentImpl = React.forwardRef<PopoverContentImplElement, PopoverCo
const popperScope = usePopperScope(__scopePopover);

// Make sure the whole tree has focus guards as our `Popover` may be
// the last element in the DOM (beacuse of the `Portal`)
// the last element in the DOM (because of the `Portal`)
useFocusGuards();

return (
Expand Down
2 changes: 1 addition & 1 deletion packages/react/primitive/src/Primitive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const Primitive = NODES.reduce((primitive, node) => {
*
* In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
* This utility should be used when dispatching a custom event from within another `discrete` event, this utility
* is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
* is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
* For example:
*
* dispatching a known click 👎
Expand Down
4 changes: 2 additions & 2 deletions packages/react/select/src/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1580,8 +1580,8 @@ const BubbleSelect = React.forwardRef<HTMLSelectElement, React.ComponentPropsWit
* as possible.
*
* We purposefully do not add the `value` attribute here to allow the value
* to be set programatically and bubble to any parent form `onChange` event.
* Adding the `value` will cause React to consider the programatic
* to be set programmatically and bubble to any parent form `onChange` event.
* Adding the `value` will cause React to consider the programmatic
* dispatch a duplicate and it will get swallowed.
*
* We use `VisuallyHidden` rather than `display: "none"` because Safari autofill
Expand Down
4 changes: 2 additions & 2 deletions packages/react/slider/src/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,8 @@ const BubbleInput = (props: React.ComponentPropsWithoutRef<'input'>) => {
* wrap it will not be able to access its value via the FormData API.
*
* We purposefully do not add the `value` attribute here to allow the value
* to be set programatically and bubble to any parent form `onChange` event.
* Adding the `value` will cause React to consider the programatic
* to be set programmatically and bubble to any parent form `onChange` event.
* Adding the `value` will cause React to consider the programmatic
* dispatch a duplicate and it will get swallowed.
*/
return <input style={{ display: 'none' }} {...inputProps} ref={ref} defaultValue={value} />;
Expand Down
2 changes: 1 addition & 1 deletion packages/react/toast/src/Toast.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ export const Chromatic = () => {
<Toast.Viewport className={chromaticViewport()}></Toast.Viewport>
</Toast.Provider>

<h2>Duration overidden</h2>
<h2>Duration overridden</h2>
<Toast.Provider duration={Infinity}>
<Toast.Root duration={SNAPSHOT_DELAY - 100} className={rootClass()}>
<div className={headerClass()}>
Expand Down

0 comments on commit 374c7d7

Please sign in to comment.