Skip to content

Commit

Permalink
Remove deprecated withModule method
Browse files Browse the repository at this point in the history
  • Loading branch information
Joozty committed Jan 6, 2020
1 parent 838f133 commit 750d033
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/elements/forms/text-field.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const TextField = ({
className={classNames
// prevents passing 'default' to the class list
.use('container', { [size]: size !== 'default' }, className)
.withModule(textFieldClassNames)}
.from(textFieldClassNames)}
>
<input id={controlId} {...inputProps} />
<label htmlFor={controlId}>{label}</label>
Expand Down
2 changes: 1 addition & 1 deletion src/elements/label.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Label = ({
<Tag
className={classNames
.use('label', color !== 'default' && color, className)
.withModule(labelStyles)}
.from(labelStyles)}
{...restProps}
>
{children}
Expand Down
10 changes: 1 addition & 9 deletions src/utils/class-names.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ class ClassNames {
return this
}

/**
* @deprecated
*/
withModule(...args) {
return this.from(...args)
}

join(className) {
this.appendix = className
return this
Expand All @@ -53,7 +46,6 @@ const from = (...args) => new ClassNames().from(...args)

ClassNames.use = use
ClassNames.from = from
ClassNames.withModule = from

export default ClassNames
export { use, from, from as withModule }
export { use, from }

1 comment on commit 750d033

@vercel
Copy link

@vercel vercel bot commented on 750d033 Jan 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.