File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,17 @@ const TagContainer = styled.div`
1111 display: flex;
1212 flex-direction: row;
1313 flex-wrap: wrap;
14+ ${ props => props . align === 'right' && `justify-content: flex-end;` } ;
1415` ;
1516
1617type Props = {
18+ align : 'right' | 'left' ,
1719 tags : Array < string > ,
1820 removeTag : ?( id : string , tag : string ) => void ,
1921} ;
2022
21- export default ( { tags, removeTag, ...props } : Props ) =>
22- < TagContainer { ...props } >
23+ export default ( { tags, removeTag, align , ...props } : Props ) =>
24+ < TagContainer align = { align || 'left' } { ...props } >
2325 { tags . sort ( ) . map ( tag =>
2426 < Margin key = { tag } vertical = { 0.5 } horizontal = { 0.25 } >
2527 < Tag removeTag = { removeTag } tag = { tag } />
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ const Description = styled.p`
5656
5757const TagContainer = styled . div `
5858 font-size: .75rem;
59- max- width: 30%;
59+ width: 30%;
6060` ;
6161
6262type Props = {
@@ -93,6 +93,7 @@ export default ({ hit }: Props) =>
9393 </ Title >
9494 < TagContainer >
9595 < Tags
96+ align = "right"
9697 style = { { margin : 0 , marginTop : - 2 } }
9798 tags = { ( hit . tags || [ ] ) . filter ( tag => tag . length < 20 ) }
9899 />
You can’t perform that action at this time.
0 commit comments