forked from usebruno/bruno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: add buttons "Dock to bottom" and "Dock to right" (usebruno#1041
- Loading branch information
1 parent
d027d90
commit e52a6d6
Showing
6 changed files
with
87 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
packages/bruno-app/src/components/ResponsePane/ResponseDockBottom/StyledWrapper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import styled from 'styled-components'; | ||
|
||
const StyledWrapper = styled.div` | ||
font-size: 0.8125rem; | ||
color: ${(props) => props.theme.requestTabPanel.responseStatus}; | ||
`; | ||
|
||
export default StyledWrapper; |
33 changes: 33 additions & 0 deletions
33
packages/bruno-app/src/components/ResponsePane/ResponseDockBottom/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from 'react'; | ||
import StyledWrapper from './StyledWrapper'; | ||
|
||
const ResponseDockBottom = ({}) => { | ||
const dockToBottom = () => { | ||
alert('dock to bottom'); | ||
}; | ||
|
||
return ( | ||
<StyledWrapper className="ml-2 flex items-center"> | ||
<button onClick={dockToBottom} title="Dock to bottom"> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
preserveAspectRatio="xMidYMid meet" | ||
viewBox="0 0 29 24" | ||
height="16" | ||
width="17" | ||
version="1.0" | ||
> | ||
<g | ||
transform="translate(4,22) scale(0.08,-0.085)" | ||
fill="currentColor" | ||
stroke="currentColor" | ||
stroke-linecap="round" | ||
> | ||
<path d="M10 120 l0 -110 135 0 135 0 0 110 0 110 -135 0 -135 0 0 -110z m250 30 l0 -60 -115 0 -115 0 0 60 0 60 115 0 115 0 0 -60z" /> | ||
</g> | ||
</svg> | ||
</button> | ||
</StyledWrapper> | ||
); | ||
}; | ||
export default ResponseDockBottom; |
8 changes: 8 additions & 0 deletions
8
packages/bruno-app/src/components/ResponsePane/ResponseDockRight/StyledWrapper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import styled from 'styled-components'; | ||
|
||
const StyledWrapper = styled.div` | ||
font-size: 0.8125rem; | ||
color: ${(props) => props.theme.requestTabPanel.responseStatus}; | ||
`; | ||
|
||
export default StyledWrapper; |
33 changes: 33 additions & 0 deletions
33
packages/bruno-app/src/components/ResponsePane/ResponseDockRight/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from 'react'; | ||
import StyledWrapper from './StyledWrapper'; | ||
|
||
const ResponseDockRight = ({}) => { | ||
const dockToRight = () => { | ||
alert('dock to right'); | ||
}; | ||
|
||
return ( | ||
<StyledWrapper className="ml-2 flex items-center"> | ||
<button onClick={dockToRight} title="Dock to right"> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
preserveAspectRatio="xMidYMid meet" | ||
viewBox="0 0 29 24" | ||
height="16" | ||
width="17" | ||
version="1.0" | ||
> | ||
<g | ||
transform="translate(4,22) scale(0.08,-0.085)" | ||
fill="currentColor" | ||
stroke="currentColor" | ||
stroke-linecap="round" | ||
> | ||
<path d="M10 120 l0 -110 135 0 135 0 0 110 0 110 -135 0 -135 0 0 -110z m180 0 l0 -90 -80 0 -80 0 0 90 0 90 80 0 80 0 0 -90z" /> | ||
</g> | ||
</svg> | ||
</button> | ||
</StyledWrapper> | ||
); | ||
}; | ||
export default ResponseDockRight; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters