-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(neuron-ui): update history list to make it more compact
- Loading branch information
Showing
3 changed files
with
61 additions
and
24 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
packages/neuron-ui/src/components/CustomRows/GroupHeader.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react' | ||
import { Stack, Text, getTheme } from 'office-ui-fabric-react' | ||
|
||
const { | ||
palette: { neutralLighterAlt, neutralSecondary, neutralLighter }, | ||
} = getTheme() | ||
|
||
const GroupHeader = ({ group }: any) => { | ||
const { name } = group | ||
return ( | ||
<Stack | ||
tokens={{ padding: 15 }} | ||
styles={{ | ||
root: { | ||
background: neutralLighterAlt, | ||
borderTop: `1px solid ${neutralSecondary}`, | ||
borderBottom: `1px solid ${neutralLighter}`, | ||
padding: `15px 12px 5px`, | ||
minWidth: '100%!important', | ||
}, | ||
}} | ||
> | ||
<Text variant="medium">{name}</Text> | ||
</Stack> | ||
) | ||
} | ||
export default GroupHeader |
22 changes: 22 additions & 0 deletions
22
packages/neuron-ui/src/components/CustomRows/HistoryRow.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react' | ||
import { DetailsRow, IDetailsRowProps } from 'office-ui-fabric-react' | ||
|
||
const HistoryRow = (props?: IDetailsRowProps) => { | ||
return props ? ( | ||
<DetailsRow | ||
{...props} | ||
styles={{ | ||
root: { | ||
animationDuration: '0!important', | ||
minWidth: '100%!important', | ||
}, | ||
cell: { | ||
paddingTop: 0, | ||
paddingBottom: 0, | ||
}, | ||
}} | ||
/> | ||
) : null | ||
} | ||
|
||
export default HistoryRow |
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