Skip to content
Snippets Groups Projects

Find and replace

Merged Christos requested to merge find-and-replace into master
2 files
+ 41
6
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -68,7 +68,6 @@ const StyledIcon = styled(Icon)`
@@ -68,7 +68,6 @@ const StyledIcon = styled(Icon)`
const CloseWrapper = styled.div`
const CloseWrapper = styled.div`
margin-left: auto;
margin-left: auto;
border-left: 1px solid #e0e2e7;
`;
`;
const FindReplaceInput = styled.input`
const FindReplaceInput = styled.input`
@@ -118,7 +117,7 @@ const ButtonReplaceAll = styled.button`
@@ -118,7 +117,7 @@ const ButtonReplaceAll = styled.button`
`;
`;
const PreviousNextContainer = styled.div`
const PreviousNextContainer = styled.div`
margin: 5px 0 0 auto;
margin: 3px 0 0 auto;
svg {
svg {
padding: ${grid(2)};
padding: ${grid(2)};
@@ -133,6 +132,12 @@ const PreviousNextContainer = styled.div`
@@ -133,6 +132,12 @@ const PreviousNextContainer = styled.div`
}
}
`;
`;
 
const PreviousNextButton = styled.span`
 
&:focus {
 
outline: none;
 
}
 
`;
 
const ExandedFindAndReplaceComponent = ({ close, nonExpandedText }) => {
const ExandedFindAndReplaceComponent = ({ close, nonExpandedText }) => {
const { app, view } = useContext(WaxContext);
const { app, view } = useContext(WaxContext);
const searchRef = useRef(null);
const searchRef = useRef(null);
@@ -206,6 +211,14 @@ const ExandedFindAndReplaceComponent = ({ close, nonExpandedText }) => {
@@ -206,6 +211,14 @@ const ExandedFindAndReplaceComponent = ({ close, nonExpandedText }) => {
close();
close();
};
};
 
const findNext = () => {
 
console.log('next');
 
};
 
 
const findPrevious = () => {
 
console.log('previous');
 
};
 
return (
return (
<Wrapper>
<Wrapper>
<TitleContainer>
<TitleContainer>
@@ -240,8 +253,12 @@ const ExandedFindAndReplaceComponent = ({ close, nonExpandedText }) => {
@@ -240,8 +253,12 @@ const ExandedFindAndReplaceComponent = ({ close, nonExpandedText }) => {
<ButtonReplace onClick={replace}>Replace</ButtonReplace>
<ButtonReplace onClick={replace}>Replace</ButtonReplace>
<ButtonReplaceAll onClick={replaceAll}>Replace All</ButtonReplaceAll>
<ButtonReplaceAll onClick={replaceAll}>Replace All</ButtonReplaceAll>
<PreviousNextContainer>
<PreviousNextContainer>
<StyledIcon name="navigatePrevious" />
<PreviousNextButton onClick={findPrevious} role="button" tabIndex="0">
<StyledIcon name="navigateNext" />
<StyledIcon name="navigatePrevious" />
 
</PreviousNextButton>
 
<PreviousNextButton onClick={findNext} role="button" tabIndex="0">
 
<StyledIcon name="navigateNext" />
 
</PreviousNextButton>
</PreviousNextContainer>
</PreviousNextContainer>
</ControlContainer>
</ControlContainer>
</Wrapper>
</Wrapper>