-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(icon): Add fixes to render icons using new css classes
- Loading branch information
Showing
5 changed files
with
37 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import capitalize from '../capitalize' | ||
|
||
describe.only('capitalize', () => { | ||
it('capitalizes a string', () => { | ||
const string = capitalize('test') | ||
|
||
expect(string).toBe('Test') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const capitalize = (string) => { | ||
return `${string.charAt(0).toUpperCase()}${string.slice(1)}` | ||
} | ||
|
||
export default capitalize | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
lzcabrera
Author
Member
|
Nice! :)
Small suggestion: Get rid of the curly braces and the return statement because its only a single expression.
I made pretty much the same exact function in the WithSpacing component. Please get rid of the duplication and put the "capitalize" in a place that can be shared by both components.