Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Button / IconButton / LinkButton: add Cambio variants
- Loading branch information
1 parent
8920a56
commit 3c442f7
Showing
21 changed files
with
780 additions
and
84 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@cambly/syntax-design-tokens": minor | ||
"@cambly/syntax-core": minor | ||
"@syntax/storybook": minor | ||
--- | ||
|
||
Add ThemeProvider & styles for Button / IconButton & LinkButton |
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
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 @@ | ||
export default function classicSize( | ||
size: "sm" | "md" | "lg" | "xl", | ||
): "sm" | "md" | "lg" { | ||
return size === "xl" ? "lg" : size; | ||
} |
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,66 @@ | ||
export function classicColor( | ||
color: | ||
| "primary" | ||
| "secondary" | ||
| "tertiary" | ||
| "quaternary" | ||
| "destructive-primary" | ||
| "destructive-secondary" | ||
| "destructive-tertiary" | ||
| "branded" | ||
| "success" | ||
| "success-primary" | ||
| "success-secondary" | ||
| "inverse", | ||
): | ||
| "primary" | ||
| "secondary" | ||
| "tertiary" | ||
| "destructive-primary" | ||
| "destructive-secondary" | ||
| "branded" | ||
| "success" | ||
| "inverse" { | ||
if (color === "quaternary") { | ||
return "inverse"; | ||
} else if (color === "destructive-tertiary") { | ||
return "destructive-secondary"; | ||
} else if (color === "success-primary" || color === "success-secondary") { | ||
return "success"; | ||
} | ||
return color; | ||
} | ||
|
||
export function cambioColor( | ||
color: | ||
| "primary" | ||
| "secondary" | ||
| "tertiary" | ||
| "quaternary" | ||
| "destructive-primary" | ||
| "destructive-secondary" | ||
| "destructive-tertiary" | ||
| "branded" | ||
| "success" | ||
| "success-primary" | ||
| "success-secondary" | ||
| "inverse", | ||
): | ||
| "primary" | ||
| "secondary" | ||
| "tertiary" | ||
| "quaternary" | ||
| "destructive-primary" | ||
| "destructive-secondary" | ||
| "branded" | ||
| "success-primary" | ||
| "success-secondary" { | ||
if (color === "success") { | ||
return "success-primary"; | ||
} else if (color === "destructive-tertiary") { | ||
return "destructive-secondary"; | ||
} else if (color === "inverse") { | ||
return "quaternary"; | ||
} | ||
return color; | ||
} |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
const loadingIconSize = { | ||
["sm"]: 16, | ||
["md"]: 20, | ||
["lg"]: 24, | ||
sm: 16, | ||
md: 20, | ||
lg: 24, | ||
}; | ||
|
||
export default loadingIconSize; |
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
const textVariant = { | ||
["sm"]: 100, | ||
["md"]: 200, | ||
["lg"]: 300, | ||
sm: 100, | ||
md: 200, | ||
lg: 300, | ||
xl: 500, | ||
} as const; | ||
|
||
export default textVariant; |
Oops, something went wrong.