Просмотр исходного кода

style(js): Spelling core UI (non code) (#36056)

Josh Soref 2 лет назад
Родитель
Сommit
bdbd7b23c1

+ 1 - 1
static/app/components/autoComplete.tsx

@@ -59,7 +59,7 @@ type GetItemArgs<T> = {
 
 type ChildrenProps<T> = Parameters<DropdownMenu['props']['children']>[0] & {
   /**
-   * Retruns props for the input element that handles searching the items
+   * Returns props for the input element that handles searching the items
    */
   getInputProps: <E extends HTMLInputElement = HTMLInputElement>(
     args: GetInputArgs<E>

+ 1 - 1
static/app/components/autoSelectText.tsx

@@ -20,7 +20,7 @@ const AutoSelectText: React.ForwardRefRenderFunction<AutoSelectHandle, Props> =
   const element = useRef<HTMLSpanElement>(null);
 
   // We need to expose a selectText method to parent components
-  // and need an imperitive ref handle.
+  // and need an imperative ref handle.
   useImperativeHandle(forwardedRef, () => ({
     selectText: () => handleClick(),
   }));

+ 1 - 1
static/app/components/charts/components/dataZoomInside.tsx

@@ -6,7 +6,7 @@ const DEFAULT: InsideDataZoomComponentOption = {
   type: 'inside',
   // Mouse wheel can not trigger zoom
   zoomOnMouseWheel: false,
-  // The translation (by mouse drag or touch drag) is avialable but zoom is not
+  // The translation (by mouse drag or touch drag) is available but zoom is not
   zoomLock: true,
   throttle: 50,
 };

+ 1 - 1
static/app/components/charts/eventsRequest.tsx

@@ -140,7 +140,7 @@ type EventsRequestPartialProps = {
    */
   field?: string[];
   /**
-   * Allows overridding the pathname.
+   * Allows overriding the pathname.
    */
   generatePathname?: (org: OrganizationSummary) => string;
   /**

+ 1 - 1
static/app/components/clipboard.tsx

@@ -81,7 +81,7 @@ function Clipboard({
 
   // XXX: Instead of assigning the `onClick` to the cloned child element, we
   // attach a event listener, otherwise we would wipeout whatever click handler
-  // may be assigne don the child.
+  // may be assigned on the child.
   const handleMount = useCallback((ref: HTMLElement) => {
     // eslint-disable-next-line react/no-find-dom-node
     setElement(findDOMNode(ref));

+ 1 - 1
static/app/components/confirm.tsx

@@ -157,7 +157,7 @@ export const openConfirmModal = ({
 
 /**
  * The confirm component is somewhat special in that you can wrap any
- * onClick-able element with this to trigger a interstital confirmation modal.
+ * onClick-able element with this to trigger a interstitial confirmation modal.
  *
  * This is the declarative alternative to using openConfirmModal
  */

+ 1 - 1
static/app/components/deprecatedforms/selectCreatableField.tsx

@@ -32,7 +32,7 @@ export default class SelectCreatableField extends SelectField {
     }
     if (this.props.value !== nextProps.value || defined(nextContext.form)) {
       const newValue = this.getValue(nextProps, nextContext);
-      // This is the only thing that is different from parent, we compare newValue against coerved value in state
+      // This is the only thing that is different from parent, we compare newValue against coerced value in state
       // To remain compatible with react-select, we need to store the option object that
       // includes `value` and `label`, but when we submit the format, we need to coerce it
       // to just return `value`. Also when field changes, it propagates the coerced value up

+ 2 - 2
static/app/components/dropdownAutoComplete/menu.tsx

@@ -240,7 +240,7 @@ function Menu({
   // emptyHidesInput is set to true.
   const showInput = !hideInput && (hasItems || !emptyHidesInput);
 
-  // Only redefine the autocomplete function if our items list has chagned.
+  // Only redefine the autocomplete function if our items list has changed.
   // This avoids producing a new array on every call.
   const stableItemFilter = useCallback(
     (filterValueOrInput: string) => autoCompleteFilter(items, filterValueOrInput),
@@ -295,7 +295,7 @@ function Menu({
           !busy && !busyItemsStillVisible && filterValueOrInput && !hasResults;
 
         // When virtualization is turned on, we need to pass in the number of
-        // selecteable items for arrow-key limits
+        // selectable items for arrow-key limits
         const itemCount = virtualizedHeight
           ? autoCompleteResults.filter(i => !i.groupLabel).length
           : undefined;

+ 1 - 1
static/app/components/dropdownBubble.tsx

@@ -32,7 +32,7 @@ type ParamsWithTheme = Params & {theme: Theme};
 /**
  * If `blendCorner` is false, then we apply border-radius to all corners
  *
- * Otherwise apply radius to opposite side of `alignMenu` *unles it is fixed width*
+ * Otherwise apply radius to opposite side of `alignMenu` *unless it is fixed width*
  */
 const getMenuBorderRadius = ({
   blendWithActor,

+ 1 - 1
static/app/components/dropdownMenuV2.tsx

@@ -49,7 +49,7 @@ type Props = {
   menuTitle?: string;
   onClose?: () => void;
   /**
-   * Current width of the trigger element. This is used as the menu's minumum
+   * Current width of the trigger element. This is used as the menu's minimum
    * width.
    */
   triggerWidth?: number;

Некоторые файлы не были показаны из-за большого количества измененных файлов