Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
150b44c1
Commit
150b44c1
authored
Oct 11, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spinner default props
parent
5ad36226
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
3 deletions
+24
-3
Spinner.ts
theme/components/Spinner.ts
+21
-0
index.ts
theme/components/index.ts
+2
-0
BlocksTableItem.tsx
ui/blocks/BlocksTableItem.tsx
+1
-3
No files found.
theme/components/Spinner.ts
0 → 100644
View file @
150b44c1
import
{
defineStyle
,
defineStyleConfig
}
from
'
@chakra-ui/styled-system
'
;
import
{
mode
}
from
'
@chakra-ui/theme-tools
'
;
const
baseStyle
=
defineStyle
((
props
)
=>
{
const
{
emptyColor
,
color
}
=
props
;
return
{
borderColor
:
color
||
'
blue.500
'
,
borderBottomColor
:
emptyColor
||
mode
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)(
props
),
borderLeftColor
:
emptyColor
||
mode
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)(
props
),
};
});
const
Spinner
=
defineStyleConfig
({
baseStyle
,
defaultProps
:
{
size
:
'
md
'
,
},
});
export
default
Spinner
;
theme/components/index.ts
View file @
150b44c1
...
...
@@ -12,6 +12,7 @@ import Modal from './Modal';
import
Popover
from
'
./Popover
'
;
import
Radio
from
'
./Radio
'
;
import
Skeleton
from
'
./Skeleton
'
;
import
Spinner
from
'
./Spinner
'
;
import
Table
from
'
./Table
'
;
import
Tabs
from
'
./Tabs
'
;
import
Tag
from
'
./Tag
'
;
...
...
@@ -34,6 +35,7 @@ const components = {
Popover
,
Radio
,
Skeleton
,
Spinner
,
Tabs
,
Table
,
Tag
,
...
...
ui/blocks/BlocksTableItem.tsx
View file @
150b44c1
...
...
@@ -19,13 +19,11 @@ interface Props {
const
BlocksTableItem
=
({
data
,
isPending
}:
Props
)
=>
{
const
link
=
useLink
();
const
spinnerEmptyColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
return
(
<
Tr
>
<
Td
fontSize=
"sm"
>
<
Flex
columnGap=
{
2
}
alignItems=
"center"
>
{
isPending
&&
<
Spinner
size=
"sm"
color=
"blue.500"
emptyColor=
{
spinnerEmptyColor
}
/>
}
{
isPending
&&
<
Spinner
size=
"sm"
/>
}
<
Link
fontWeight=
{
600
}
href=
{
link
(
'
block_index
'
,
{
id
:
String
(
data
.
height
)
})
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment