Skip to content

Commit

Permalink
Move the directive from index files to components
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak committed May 29, 2024
1 parent 5da0b5d commit 694612f
Show file tree
Hide file tree
Showing 19 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import type { CheckboxIndicatorProps } from './CheckboxIndicator.types';
Expand Down
1 change: 1 addition & 0 deletions packages/mui-base/src/Checkbox/Root/CheckboxContext.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import type { CheckboxContextValue } from './CheckboxRoot.types';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-base/src/Checkbox/Root/CheckboxRoot.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import { CheckboxContext } from './CheckboxContext';
Expand Down
1 change: 1 addition & 0 deletions packages/mui-base/src/Checkbox/Root/useCheckboxRoot.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import type { UseCheckboxRootParameters, UseCheckboxRootReturnValue } from './CheckboxRoot.types';
import { useControlled } from '../../utils/useControlled';
Expand Down
1 change: 0 additions & 1 deletion packages/mui-base/src/Checkbox/index.barrel.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
'use client';
export { CheckboxRoot } from './Root/CheckboxRoot';
export { useCheckboxRoot } from './Root/useCheckboxRoot';
export { CheckboxContext } from './Root/CheckboxContext';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import type { NumberFieldDecrementProps } from './NumberFieldDecrement.types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import type { NumberFieldGroupProps } from './NumberFieldGroup.types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import type { NumberFieldIncrementProps } from './NumberFieldIncrement.types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import type { NumberFieldInputProps } from './NumberFieldInput.types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import { NumberFieldContextValue } from './NumberFieldRoot.types';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-base/src/NumberField/Root/NumberFieldRoot.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import { NumberFieldContext } from './NumberFieldContext';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import type {
UseNumberFieldRootParameters,
Expand Down
1 change: 1 addition & 0 deletions packages/mui-base/src/NumberField/Root/useScrub.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { ScrubHandle, ScrubParams } from './useScrub.types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import type { NumberFieldScrubAreaProps } from './NumberFieldScrubArea.types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
Expand Down
1 change: 0 additions & 1 deletion packages/mui-base/src/NumberField/index.barrel.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
'use client';
export { NumberFieldRoot } from './Root/NumberFieldRoot';
export { NumberFieldContext } from './Root/NumberFieldContext';
export { useNumberFieldRoot } from './Root/useNumberFieldRoot';
Expand Down
1 change: 1 addition & 0 deletions packages/mui-base/src/Switch/Root/SwitchContext.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import { type SwitchOwnerState } from './SwitchRoot.types';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-base/src/Switch/Thumb/SwitchThumb.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import { SwitchThumbProps } from './SwitchThumb.types';
Expand Down
1 change: 0 additions & 1 deletion packages/mui-base/src/Switch/index.barrel.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
'use client';
export { SwitchRoot } from './Root/SwitchRoot';
export { useSwitchRoot } from './Root/useSwitchRoot';
export { SwitchContext } from './Root/SwitchContext';
Expand Down

0 comments on commit 694612f

Please sign in to comment.