mirror of
https://github.com/jgthms/bulma
synced 2026-03-19 03:44:31 -07:00
Add Color module
This commit is contained in:
9
docs/_react/bulma-customizer/src/utils.js
Normal file
9
docs/_react/bulma-customizer/src/utils.js
Normal file
@@ -0,0 +1,9 @@
|
||||
export function unslug(slug) {
|
||||
// Replace hyphens and underscores with spaces
|
||||
let result = slug.replace(/[-_]/g, " ");
|
||||
|
||||
// Capitalize the first letter of each word
|
||||
return result.replace(/\b\w/g, function (char) {
|
||||
return char.toUpperCase();
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user