Skip to content

Commit

Permalink
chore: remove deprecaetd unused classNameBuilders
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikdosoudil committed Nov 21, 2024
1 parent f6460e2 commit e8a41d6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 42 deletions.
35 changes: 0 additions & 35 deletions src/lib/classNameBuilders.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ import { numberToWord } from './numberToWord'
*/
export const getKeyOnly = (val, key) => val && key

/**
* @deprecated
*/
export const useKeyOnly = getKeyOnly

/**
* Props that require both a key and value to create a className.
* @param {*} val A props value
Expand All @@ -37,11 +32,6 @@ export const useKeyOnly = getKeyOnly
*/
export const getValueAndKey = (val, key) => val && val !== true && `${val} ${key}`

/**
* @deprecated
*/
export const useValueAndKey = getValueAndKey

/**
* Props whose key will be used in className, or value and key.
* @param {*} val A props value
Expand All @@ -57,11 +47,6 @@ export const useValueAndKey = getValueAndKey
*/
export const getKeyOrValueAndKey = (val, key) => val && (val === true ? key : `${val} ${key}`)

/**
* @deprecated
*/
export const useKeyOrValueAndKey = getKeyOrValueAndKey

//
// Prop to className exceptions
//
Expand Down Expand Up @@ -89,11 +74,6 @@ export const getMultipleProp = (val, key) => {
.join(' ')
}

/**
* @deprecated
*/
export const useMultipleProp = getMultipleProp

/**
* The "textAlign" prop follows the useValueAndKey except when the value is "justified'.
* In this case, only the class "justified" is used, ignoring the "aligned" class.
Expand All @@ -110,11 +90,6 @@ export const useMultipleProp = getMultipleProp
export const getTextAlignProp = (val) =>
val === 'justified' ? 'justified' : getValueAndKey(val, 'aligned')

/**
* @deprecated
*/
export const useTextAlignProp = getTextAlignProp

/**
* The "verticalAlign" prop follows the useValueAndKey.
*
Expand All @@ -126,11 +101,6 @@ export const useTextAlignProp = getTextAlignProp
*/
export const getVerticalAlignProp = (val) => getValueAndKey(val, 'aligned')

/**
* @deprecated
*/
export const useVerticalAlignProp = getVerticalAlignProp

/**
* Create "X", "X wide" and "equal width" classNames.
* "X" is a numberToWord value and "wide" is configurable.
Expand Down Expand Up @@ -162,8 +132,3 @@ export const getWidthProp = (val, widthClass = '', canEqual = false) => {
}
return numberToWord(val)
}

/**
* @deprecated
*/
export const useWidthProp = getWidthProp
7 changes: 0 additions & 7 deletions src/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,12 @@ export ModernAutoControlledComponent from './ModernAutoControlledComponent'
export * as childrenUtils from './childrenUtils'

export {
useKeyOnly,
getKeyOnly,
useKeyOrValueAndKey,
getKeyOrValueAndKey,
useValueAndKey,
getValueAndKey,
useMultipleProp,
getMultipleProp,
useTextAlignProp,
getTextAlignProp,
useVerticalAlignProp,
getVerticalAlignProp,
useWidthProp,
getWidthProp,
} from './classNameBuilders'

Expand Down

0 comments on commit e8a41d6

Please sign in to comment.