-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(navigation-user): add component tokens (#10608)
**Related Issue:** #7180 ## Summary Add the following component-scoped CSS Variables to calcite-navigation-user: `--calcite-navigation-accent-color`: Specifies the components's border color when `active`. `--calcite-navigation-user-avatar-corner-radius`: Specifies the corner radius of avatar. `--calcite-navigation-user-avatar-color`: Specifies the icon color of avatar. `--calcite-navigation-background-color`: Specifies the component's background color. `--calcite-navigation-user-full-name-text-color`: Specifies the component's full name text color. `--calcite-navigation-user-name-text-color`: Specifies the component's username text color.
- Loading branch information
1 parent
e5465c7
commit 32d96a9
Showing
4 changed files
with
114 additions
and
29 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
21 changes: 21 additions & 0 deletions
21
packages/calcite-components/src/custom-theme/navigation-user.ts
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,21 @@ | ||
import { html } from "../../support/formatting"; | ||
import { boolean } from "../../.storybook/utils"; | ||
|
||
export const navigationUserTokens = { | ||
calciteNavigationAccentColor: "", | ||
calciteNavigationUserBackgroundColor: "", | ||
calciteNavigationUserAvatarCornerRadius: "", | ||
calciteNavigationUserAvatarColor: "", | ||
calciteNavigationUserFullNameTextColor: "", | ||
calciteNavigationUserUserNameTextColor: "", | ||
}; | ||
|
||
const navigationUser = (active = false): string => html` | ||
<calcite-navigation-user | ||
full-name="Wendell Berry" | ||
username="w_berry" | ||
${boolean("active", active)} | ||
></calcite-navigation-user> | ||
`; | ||
|
||
export const navigationUsers = html`${navigationUser(true)} ${navigationUser()}`; |