Skip to content

Commit 783189b

Browse files
katesmatthewssaylestyler
authored andcommitted
Fix merge (#51)
1 parent 1b8f17f commit 783189b

File tree

1 file changed

+23
-35
lines changed

1 file changed

+23
-35
lines changed

app/components/sidepanels/InfoPanel.tsx

Lines changed: 23 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,38 @@
11
import * as React from 'react';
22
import styled from 'styled-components';
3-
4-
import { InformationPanel } from './sidePanelMolecules/Headers'
5-
import { Grommet } from "grommet";
6-
import { grommet } from 'grommet/themes';
7-
import { License, CircleInformation } from 'grommet-icons';
8-
3+
import { InformationPanel } from './sidePanelMolecules/titles'
94

105
interface ISidePanelTableWrapperProps {
116
sidePanelVisibility: boolean;
127
}
138

149
const SidePanelTableListWrapper = styled.div<ISidePanelTableWrapperProps>`
1510
color: black;
16-
padding: 20px;
17-
width: 250px;
18-
background-color: transparent;
11+
padding: 40px;
12+
width: ${({ sidePanelVisibility }) =>
13+
sidePanelVisibility ? '300px' : '0px'};
14+
height: 100vh;
15+
background-color: white;
16+
color: black;
1917
transition: width 500ms ease-in-out;
2018
`;
2119

2220
const InfoSection = styled.div`
2321
overflow-wrap: break-word;
24-
padding: 30px 0px;
2522
`;
2623

24+
25+
2726
const Text = styled.p`
28-
font-family: 'Poppins', sans-serif;
27+
font-size: 100%;
2928
color: black;
30-
font-size: 14px;
31-
font-weight: bold;
32-
padding: 1px 5px;
33-
:hover{
34-
background-color: #f4f4f4;
35-
}
3629
`;
3730

38-
const LabelTextWrapper = styled.div`
39-
margin: 5px 0px;
40-
`
41-
4231
const Label = styled.label`
43-
font-size: 12px;
44-
padding: 2px 5px;
32+
font-size: 80%;
4533
color: black;
46-
font-family: 'Poppins', sans-serif;
4734
`;
4835

49-
const EmptyState = styled.div`
50-
padding: 40px 0px;
51-
font-size: 18px;
52-
`
53-
5436
interface ISelectedTable {
5537
columns?: any[];
5638
foreignKeys?: any[];
@@ -83,8 +65,8 @@ const InfoPanel: React.SFC<Props> = ({
8365
foreignKeyRelationships.push(
8466
<li>
8567
<Text key={key}>
86-
{key.column_name} from table
87-
{key.foreign_table_name}, {key.foreign_column_name}
68+
{key.column_name} <Label as="span">from table</Label>
69+
{key.foreign_table_name}({key.foreign_column_name})
8870
</Text>
8971
</li>
9072
);
@@ -94,7 +76,7 @@ const InfoPanel: React.SFC<Props> = ({
9476
for (const foreignTableOfPrimary in foreignKeysOfPrimary) {
9577
primaryKeyRelationships.push(
9678
<li>
97-
<Text>{foreignTableOfPrimary}, {foreignKeysOfPrimary[foreignTableOfPrimary]}</Text>
79+
{foreignTableOfPrimary}({foreignKeysOfPrimary[foreignTableOfPrimary]})
9880
</li>
9981
);
10082
}
@@ -126,9 +108,15 @@ const InfoPanel: React.SFC<Props> = ({
126108
<ul>{foreignKeyRelationships}</ul>
127109
</div>
128110
)}
129-
</SidePanelTableListWrapper>
130-
</Grommet>
111+
</InfoSection>
112+
) : (
113+
<div>
114+
You haven't selected a table yet, click on a table to see their
115+
information
116+
</div>
117+
)}
118+
</SidePanelTableListWrapper>
131119
);
132120
};
133121

134-
export default InfoPanel;
122+
export default InfoPanel;

0 commit comments

Comments
 (0)