Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Commit

Permalink
refactor(*): code cleanup,remove unecessary CSS - i320
Browse files Browse the repository at this point in the history
Signed-off-by: Lenvin Gonsalves <[email protected]>
  • Loading branch information
98lenvi committed May 5, 2020
1 parent 3c125e1 commit 184a711
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 23 deletions.
13 changes: 5 additions & 8 deletions src/ErrorLogger/Error.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,29 @@ const ErrorComponent = (props) => {
onClick: handleClickSpecError,
};

const fullMessageProps = {
};

const errorArrowProps = {
expanded: specErrorVisible,
onClick: handleClickSpecError,
};

return (
<SC.ErrorComponent className={'errorComponent'}>
<SC.ErrorComponent className='errorComponent'>

<SC.ArrowDiv {...errorArrowProps} className={specErrorVisible?'errorArrowDivExpanded':'errorArrowDivCollapsed'}/>
<SC.ErrorFile onClick={() => errorNav(error)} className={'errorFile'}>
<SC.ErrorFile onClick={() => errorNav(error)} className='errorFile'>
{ACT.typeSwitchCase(error || {})}
</SC.ErrorFile>

<SC.ErrorType {...typeProps} className={'errorType'}>
<SC.ErrorType {...typeProps} className='errorType'>
{ACT.overalltypeSwitchCase(error).name || 'Unknown Error'}:
</SC.ErrorType>

<SC.ErrorShortMessage {...shortMessageProps} className={'errorShortMessage'}>
<SC.ErrorShortMessage {...shortMessageProps} className='errorShortMessage'>
{ACT.truncateMessage(ACT.overalltypeSwitchCase(error).shortMessage || 'Unknown Error')}
</SC.ErrorShortMessage>

{specErrorVisible
&& <SC.ErrorFullMessage {...fullMessageProps} className={'errorFullMessage'}>
&& <SC.ErrorFullMessage {...fullMessageProps} className='errorFullMessage'>
{ACT.overalltypeSwitchCase(error).message || 'Unknown Error'}
</SC.ErrorFullMessage>}
</SC.ErrorComponent>
Expand Down
6 changes: 3 additions & 3 deletions src/ErrorLogger/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ const ErrorLogger = (props) => {
return (
<CustomStylesWrapper>
{errorsVisible
&& <SC.ErrorDisplay {...displayProps} className={'errorDisplay'}>
&& <SC.ErrorDisplay {...displayProps} className='errorDisplay'>
{errorComponentGenerator(errors)}
</SC.ErrorDisplay>
}
<SC.ErrorsHeader {...headerProps} className={'errorHeader'}>
<SC.ErrorsHeader {...headerProps} className='errorHeader'>
{ACT.gtZero(errorLength)
&& <SC.ErrorSymbol {...symbolProps} />}
{ACT.errorArrayLength(errors)} {ACT.isMultipleErrors(errors)}
<SC.ErrorBarArrow {...barArrowProps} className={'errorBarArrow'}/>
<SC.ErrorBarArrow {...barArrowProps} className='errorBarArrow'/>
</SC.ErrorsHeader>
</CustomStylesWrapper>
);
Expand Down
2 changes: 0 additions & 2 deletions src/ErrorLogger/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ export const ErrorDisplay = styled.div`
overflow-y: scroll;
background-color: #1E2D53;
box-shadow: 0 -2px 20px 0 rgba(20,31,60,0.65);
z-index: auto;
`;

ErrorDisplay.displayName = 'ErrorDisplay';

export const ErrorsHeader = styled.div`
z-index: auto;
width: 100%;
position: fixed;
transition: 1s;
Expand Down
8 changes: 4 additions & 4 deletions src/Navigation/generators.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const headerGenerator = (props) => {
<SC.HeaderClause
key={key}
onClick={() => navigateHeader(key, type)}
className={'navHeaderClause'}
className='navHeaderClause'
>
{text}
</ SC.HeaderClause>
Expand All @@ -33,7 +33,7 @@ export const headerGenerator = (props) => {
<SC.HeaderOne
key={key}
onClick={() => navigateHeader(key, type)}
className={'navHeaderH1'}
className='navHeaderH1'
>
{text}
</ SC.HeaderOne>
Expand All @@ -43,7 +43,7 @@ export const headerGenerator = (props) => {
<SC.HeaderTwo
key={key}
onClick={() => navigateHeader(key, type)}
className={'navHeaderH2'}
className='navHeaderH2'
>
{text}
</ SC.HeaderTwo>
Expand All @@ -53,7 +53,7 @@ export const headerGenerator = (props) => {
<SC.HeaderThree
key={key}
onClick={() => navigateHeader(key, type)}
className={'navHeaderH3'}
className='navHeaderH3'
>
{text}
</ SC.HeaderThree>
Expand Down
1 change: 0 additions & 1 deletion src/Navigation/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import styled from 'styled-components';

export const NavigationWrapper = styled.div`
position: static;
top: auto;
max-height: 80vh;
width: inherit;
background-color: inherit;
Expand Down
6 changes: 3 additions & 3 deletions src/TemplateLibrary/Components/TemplateCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ const DescriptionContainer = styled(Card.Description)`
const TemplateCard = props => (
<CardContainer fluid
key={props.template.uri}
className={'templateCard'}
className='templateCard'
>
<Card.Content>
<TemplateLogo src={props.template.icon} />
<Title className={'templateCardTitle'}>
<Title className='templateCardTitle'>
{
props.template.displayName
? props.template.displayName
: props.template.name
}
<Version>v {props.template.version}</Version>
</Title>
<DescriptionContainer className={'templateCardDesc'}>
<DescriptionContainer className='templateCardDesc'>
{props.template.description}
</DescriptionContainer>
</Card.Content>
Expand Down
4 changes: 2 additions & 2 deletions src/TemplateLibrary/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const TemplateLibraryComponent = (props) => {
<CustomStylesWrapper>
<TemplatesWrapper>
<Header>
<HeaderTitle className={'templateListTitle'} >Clause Templates</HeaderTitle>
<HeaderTitle className='templateListTitle' >Clause Templates</HeaderTitle>
<HeaderImports>
{props.import
&& <ImportComponent importInput={props.import} />}
Expand All @@ -136,7 +136,7 @@ const TemplateLibraryComponent = (props) => {
</HeaderImports>
</Header>
<Functionality>
<SearchInput className="icon" fluid icon="search" placeholder="Search..." onChange={onQueryChange} className={'templateSearchInput'} />
<SearchInput className="icon" fluid icon="search" placeholder="Search..." onChange={onQueryChange} className='templateSearchInput' />
{props.addTemp
&& <NewClauseComponent addTempInput={props.addTemp} />}
</Functionality>
Expand Down

0 comments on commit 184a711

Please sign in to comment.