-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UnderlineNav] : Introduce loading counters (#2378)
* loading state for counters - only for UnderlineNav * CR feedback & changeset & docs and tests * Update docs/content/drafts/UnderlineNav2.mdx Co-authored-by: Cole Bemis <colebemis@github.com> * prop rename to loadingCounters Co-authored-by: Cole Bemis <colebemis@github.com>
- Loading branch information
1 parent
e4af7a7
commit c35c2ac
Showing
9 changed files
with
109 additions
and
7 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,5 @@ | ||
--- | ||
'@primer/react': minor | ||
--- | ||
|
||
UnderlineNav2: Introducing loading states for counters |
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,17 @@ | ||
import styled, {keyframes} from 'styled-components' | ||
import {get} from '../constants' | ||
|
||
const loading = keyframes` | ||
from { opacity: 0.4; } | ||
to { opacity: 0.8; } | ||
` | ||
|
||
export const LoadingCounter = styled.span` | ||
animation: ${loading} 1.2s linear infinite alternate; | ||
background-color: ${get('colors.neutral.emphasis')}; | ||
border-color: ${get('colors.border.default')}; | ||
width: 1.5rem; | ||
height: 1rem; // 16px | ||
display: inline-block; | ||
border-radius: 20px; | ||
` |
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
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