Skip to content

Commit

Permalink
Deprecate legacy slots (#3205)
Browse files Browse the repository at this point in the history
  • Loading branch information
colebemis authored Apr 24, 2023
1 parent 2ab691f commit cb233cf
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
3 changes: 0 additions & 3 deletions src/_CheckboxOrRadioGroup/slots.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/deprecated/ChoiceFieldset/ChoiceFieldset.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import {Box, useSSRSafeId} from '../..'
import createSlots from '../../utils/create-slots'
import createSlots from '../utils/create-slots'
import {FormValidationStatus} from '../../utils/types/FormValidationStatus'
import ValidationAnimationContainer from '../../_ValidationAnimationContainer'
import InputValidation from '../../_InputValidation'
Expand Down
2 changes: 1 addition & 1 deletion src/deprecated/InputField/slots.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import createSlots from '../../utils/create-slots'
import createSlots from '../utils/create-slots'

export const {Slots, Slot} = createSlots(['Caption', 'Input', 'Label', 'LeadingVisual'])
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import React from 'react'
import {useForceUpdate} from './use-force-update'
import useLayoutEffect from './useIsomorphicLayoutEffect'
import {useForceUpdate} from '../../utils/use-force-update'
import useLayoutEffect from '../../utils/useIsomorphicLayoutEffect'

/** createSlots is a factory that can create a
/**
* @deprecated Use the `useSlots` hook instead.
*
* createSlots is a factory that can create a
* typesafe Slots + Slot pair to use in a component definition
* For example: ActionList.Item uses createSlots to get a Slots wrapper
* + Slot component that is used by LeadingVisual, Description
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import {render, waitFor} from '@testing-library/react'
import createSlots from '../../utils/create-slots'
import createSlots from './create-slots'

// setup a component with slots
const {Slots, Slot} = createSlots(['One', 'Two', 'Three'])
Expand Down

0 comments on commit cb233cf

Please sign in to comment.