Skip to content

Commit

Permalink
feat(neuron-ui): add basic style on the list header of transaction list
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Jul 15, 2019
1 parent ffd8879 commit 3a7eeaf
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion packages/neuron-ui/src/components/TransactionList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import React, { useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import {
Stack,
Text,
DetailsList,
TextField,
IColumn,
IGroup,
CheckboxVisibility,
ITextFieldStyleProps,
getTheme,
} from 'office-ui-fabric-react'

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

const timeFormatter = new Intl.DateTimeFormat('en-GB')
const theme = getTheme()

const MIN_CELL_WIDTH = 70

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

const onRenderHeader = ({ group }: any) => {
const { name } = group
return <Text variant="large">{name}</Text>
return (
<Stack
tokens={{ padding: 15 }}
styles={{
root: {
background: theme.palette.neutralLighterAlt,
borderTop: `1px solid ${theme.palette.neutralSecondary}`,
borderBottom: `1px solid ${theme.palette.neutralLighter}`,
},
}}
>
<Text variant="large">{name}</Text>
</Stack>
)
}

const TransactionList = ({
Expand Down

0 comments on commit 3a7eeaf

Please sign in to comment.