Skip to content
Snippets Groups Projects
Commit 04ba95f9 authored by chris's avatar chris
Browse files

buttons for previous next

parent a9a68883
No related branches found
No related tags found
1 merge request!190Find and replace
...@@ -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>
......
...@@ -70,6 +70,12 @@ const CloseWrapper = styled.div` ...@@ -70,6 +70,12 @@ const CloseWrapper = styled.div`
margin-left: 1%; margin-left: 1%;
`; `;
const PreviousNextButton = styled.span`
&:focus {
outline: none;
}
`;
const ExpandedWrapper = styled.div``; const ExpandedWrapper = styled.div``;
const FindComponent = ({ close, expand, setPreviousSearcValue }) => { const FindComponent = ({ close, expand, setPreviousSearcValue }) => {
...@@ -126,6 +132,14 @@ const FindComponent = ({ close, expand, setPreviousSearcValue }) => { ...@@ -126,6 +132,14 @@ const FindComponent = ({ close, expand, setPreviousSearcValue }) => {
setPreviousSearcValue(searchValue); setPreviousSearcValue(searchValue);
}; };
const findNext = () => {
console.log('next');
};
const findPrevious = () => {
console.log('previous');
};
return ( return (
<Wrapper> <Wrapper>
<SingleRow> <SingleRow>
...@@ -139,8 +153,12 @@ const FindComponent = ({ close, expand, setPreviousSearcValue }) => { ...@@ -139,8 +153,12 @@ const FindComponent = ({ close, expand, setPreviousSearcValue }) => {
/> />
<CounterInput> {counterText} </CounterInput> <CounterInput> {counterText} </CounterInput>
</SearchInputWrapper> </SearchInputWrapper>
<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>
<ExpandedWrapper onClick={showExpanded}> <ExpandedWrapper onClick={showExpanded}>
<StyledIcon name="more" /> <StyledIcon name="more" />
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment