-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(explorer): stlye the main page table (#2349)
- Loading branch information
1 parent
31612f6
commit e80d984
Showing
12 changed files
with
337 additions
and
187 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,2 @@ | ||
--- | ||
--- |
80 changes: 55 additions & 25 deletions
80
packages/apps/explorer/src/components/block-activity-graph/block-activity-graph.tsx
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
13 changes: 13 additions & 0 deletions
13
packages/apps/explorer/src/components/block-activity-graph/style.css.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,13 @@ | ||
import { tokens } from '@kadena/kode-ui/styles'; | ||
import { style } from '@vanilla-extract/css'; | ||
|
||
export const barClass = style([ | ||
{ | ||
position: 'absolute', | ||
left: 0, | ||
width: '8px', | ||
backgroundColor: | ||
tokens.kda.foundation.color.icon.brand.primary.inverse.default, | ||
transition: 'all 1s ease', | ||
}, | ||
]); |
86 changes: 81 additions & 5 deletions
86
packages/apps/explorer/src/components/block-table/block-header/block-header.css.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 |
---|---|---|
@@ -1,13 +1,89 @@ | ||
import { atoms } from '@kadena/kode-ui/styles'; | ||
import { style } from '@vanilla-extract/css'; | ||
import { barClass } from '@/components/block-activity-graph/style.css'; | ||
import { $$pageWidth } from '@/components/layout/styles.css'; | ||
import { atoms, responsiveStyle, token, tokens } from '@kadena/kode-ui/styles'; | ||
import { globalStyle, style } from '@vanilla-extract/css'; | ||
import { blockGridHoverableStyle } from '../block-table.css'; | ||
|
||
export const blockActivityColumnClass = style([ | ||
{ | ||
paddingBlockEnd: '0', | ||
}, | ||
]); | ||
|
||
export const headerColumnStyle = style([ | ||
atoms({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
borderStyle: 'solid', | ||
borderWidth: 'hairline', | ||
padding: 'md', | ||
paddingBlock: 'sm', | ||
backgroundColor: 'surface.default', | ||
}), | ||
{ | ||
selectors: { | ||
'&:nth-child(even)': { | ||
background: token('color.background.layer.default'), | ||
}, | ||
'&:nth-child(3), &:nth-child(5)': { | ||
background: token('color.background.input.default'), | ||
}, | ||
}, | ||
}, | ||
responsiveStyle({ | ||
xs: { | ||
selectors: { | ||
'&:nth-child(2), &:nth-child(7)': { | ||
display: 'none', | ||
}, | ||
}, | ||
}, | ||
md: { | ||
selectors: { | ||
'&:nth-child(2), &:nth-child(7)': { | ||
display: 'flex', | ||
}, | ||
}, | ||
}, | ||
}), | ||
]); | ||
|
||
globalStyle( | ||
`${blockGridHoverableStyle}:hover ${headerColumnStyle}:nth-child(even)`, | ||
{ | ||
backgroundColor: tokens.kda.foundation.color.background.base['@hover'], | ||
}, | ||
); | ||
|
||
globalStyle( | ||
`${blockGridHoverableStyle}:hover ${headerColumnStyle}:nth-child(3), ${blockGridHoverableStyle}:hover ${headerColumnStyle}:nth-child(5)`, | ||
{ | ||
background: token('color.background.input.default'), | ||
}, | ||
); | ||
|
||
globalStyle(`${blockGridHoverableStyle}:hover ${barClass}`, { | ||
backgroundColor: | ||
tokens.kda.foundation.color.icon.brand.primary.inverse['@hover'], | ||
}); | ||
|
||
export const columnTitleClass = style([ | ||
atoms({ | ||
color: 'text.gray.default', | ||
}), | ||
]); | ||
|
||
export const blockHeaderFixedClass = style([ | ||
atoms({ | ||
position: 'fixed', | ||
}), | ||
{ | ||
top: '70px', | ||
width: '100%', | ||
zIndex: tokens.kda.foundation.zIndex.dialog, | ||
}, | ||
responsiveStyle({ | ||
xxl: { | ||
width: $$pageWidth, | ||
}, | ||
}), | ||
]); |
87 changes: 39 additions & 48 deletions
87
packages/apps/explorer/src/components/block-table/block-header/block-header.tsx
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
Oops, something went wrong.