Skip to content

Commit 3a7eeaf

Browse files
committed
feat(neuron-ui): add basic style on the list header of transaction list
1 parent ffd8879 commit 3a7eeaf

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

  • packages/neuron-ui/src/components/TransactionList

packages/neuron-ui/src/components/TransactionList/index.tsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import React, { useMemo } from 'react'
22
import { useTranslation } from 'react-i18next'
33
import {
4+
Stack,
45
Text,
56
DetailsList,
67
TextField,
78
IColumn,
89
IGroup,
910
CheckboxVisibility,
1011
ITextFieldStyleProps,
12+
getTheme,
1113
} from 'office-ui-fabric-react'
1214

1315
import { StateDispatch } from 'states/stateProvider/reducer'
@@ -16,6 +18,7 @@ import { appCalls } from 'services/UILayer'
1618
import { useLocalDescription } from 'utils/hooks'
1719

1820
const timeFormatter = new Intl.DateTimeFormat('en-GB')
21+
const theme = getTheme()
1922

2023
const MIN_CELL_WIDTH = 70
2124

@@ -25,7 +28,20 @@ interface FormatTransaction extends State.Transaction {
2528

2629
const onRenderHeader = ({ group }: any) => {
2730
const { name } = group
28-
return <Text variant="large">{name}</Text>
31+
return (
32+
<Stack
33+
tokens={{ padding: 15 }}
34+
styles={{
35+
root: {
36+
background: theme.palette.neutralLighterAlt,
37+
borderTop: `1px solid ${theme.palette.neutralSecondary}`,
38+
borderBottom: `1px solid ${theme.palette.neutralLighter}`,
39+
},
40+
}}
41+
>
42+
<Text variant="large">{name}</Text>
43+
</Stack>
44+
)
2945
}
3046

3147
const TransactionList = ({

0 commit comments

Comments
 (0)