Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.

Commit

Permalink
Create utils/css.ts; copy of Polaris'
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerkingman-niche committed May 28, 2020
1 parent 1246b56 commit f4bb4b6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/utilities/css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type Falsy = boolean | undefined | null | 0;

export function classNames(...classes: (string | Falsy)[]) {
return classes.filter(Boolean).join(' ');
}

export function variationName(name: string, value: string) {
return `${name}${value.charAt(0).toUpperCase()}${value.slice(1)}`;
}

0 comments on commit f4bb4b6

Please sign in to comment.