Skip to content

Commit

Permalink
Update mergeProps
Browse files Browse the repository at this point in the history
  • Loading branch information
gucal committed Jan 17, 2024
1 parent 65f2e37 commit 3150d98
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
5 changes: 3 additions & 2 deletions components/lib/carousel/Carousel.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import * as React from 'react';
import PrimeReact, { PrimeReactContext, localeOption } from '../api/Api';
import { useHandleStyle } from '../componentbase/ComponentBase';
import { useMergeProps, useMountEffect, usePrevious, useResizeListener, useUpdateEffect } from '../hooks/Hooks';
import { useMountEffect, usePrevious, useResizeListener, useUpdateEffect } from '../hooks/Hooks';
import { ChevronDownIcon } from '../icons/chevrondown';
import { ChevronLeftIcon } from '../icons/chevronleft';
import { ChevronRightIcon } from '../icons/chevronright';
import { ChevronUpIcon } from '../icons/chevronup';
import { Ripple } from '../ripple/Ripple';
import { mergeProps } from '../utils/Utils';

import { DomHandler, IconUtils, ObjectUtils, UniqueComponentId, classNames } from '../utils/Utils';
import { CarouselBase } from './CarouselBase';

const CarouselItem = React.memo((props) => {
const mergeProps = useMergeProps();
const { ptm, cx } = props;
const key = props.className && props.className === 'p-carousel-item-cloned' ? 'itemCloned' : 'item';
const content = props.template(props.item);
Expand Down
3 changes: 1 addition & 2 deletions components/lib/dataview/DataView.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import * as React from 'react';
import PrimeReact, { localeOption, PrimeReactContext } from '../api/Api';
import { useHandleStyle } from '../componentbase/ComponentBase';
import { useMergeProps } from '../hooks/Hooks';
import { BarsIcon } from '../icons/bars';
import { SpinnerIcon } from '../icons/spinner';
import { ThLargeIcon } from '../icons/thlarge';
import { Paginator } from '../paginator/Paginator';
import { Ripple } from '../ripple/Ripple';
import { classNames, IconUtils, ObjectUtils } from '../utils/Utils';
import { mergeProps } from '../utils/Utils';
import { DataViewBase, DataViewLayoutOptionsBase } from './DataViewBase';

export const DataViewLayoutOptions = React.memo((inProps) => {
const mergeProps = useMergeProps();
const context = React.useContext(PrimeReactContext);
const props = DataViewLayoutOptionsBase.getProps(inProps, context);
const { ptm, cx } = DataViewLayoutOptionsBase.setMetaData({
Expand Down
4 changes: 2 additions & 2 deletions components/lib/galleria/Galleria.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import * as React from 'react';
import PrimeReact, { PrimeReactContext, localeOption } from '../api/Api';
import { useHandleStyle } from '../componentbase/ComponentBase';
import { CSSTransition } from '../csstransition/CSSTransition';
import { useInterval, useMergeProps, useUnmountEffect } from '../hooks/Hooks';
import { useInterval, useUnmountEffect } from '../hooks/Hooks';
import { mergeProps } from '../utils/Utils';
import { TimesIcon } from '../icons/times';
import { Portal } from '../portal/Portal';
import { Ripple } from '../ripple/Ripple';
Expand All @@ -13,7 +14,6 @@ import { GalleriaThumbnails } from './GalleriaThumbnails';

export const Galleria = React.memo(
React.forwardRef((inProps, ref) => {
const mergeProps = useMergeProps();
const context = React.useContext(PrimeReactContext);
const props = GalleriaBase.getProps(inProps, context);

Expand Down
6 changes: 3 additions & 3 deletions components/lib/galleria/GalleriaThumbnails.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import * as React from 'react';
import PrimeReact, { PrimeReactContext, localeOption } from '../api/Api';
import { useMergeProps, useMountEffect, usePrevious, useResizeListener, useUpdateEffect } from '../hooks/Hooks';
import { useMountEffect, usePrevious, useResizeListener, useUpdateEffect } from '../hooks/Hooks';
import { ChevronDownIcon } from '../icons/chevrondown';
import { ChevronLeftIcon } from '../icons/chevronleft';
import { ChevronRightIcon } from '../icons/chevronright';
import { ChevronUpIcon } from '../icons/chevronup';

import { Ripple } from '../ripple/Ripple';
import { DomHandler, IconUtils, ObjectUtils, UniqueComponentId, classNames } from '../utils/Utils';

import { mergeProps } from '../utils/Utils';
const GalleriaThumbnailItem = React.memo((props) => {
const mergeProps = useMergeProps();
const { ptm, cx } = props;

const getPTOptions = (key, options) => {
Expand Down

0 comments on commit 3150d98

Please sign in to comment.