bruno/renderer/components/RequestTabs/StyledWrapper.js

141 lines
2.6 KiB
JavaScript
Raw Normal View History

2021-12-03 21:33:46 +01:00
import styled from 'styled-components';
const Wrapper = styled.div`
ul {
width: 100%;
padding: 0;
margin: 0 0 10px;
padding-left: 1rem;
2022-01-24 23:11:35 +01:00
border-bottom: 1px solid var(--color-layout-border);
2021-12-03 21:33:46 +01:00
li {
display: inline-flex;
2021-12-03 21:33:46 +01:00
width: 150px;
border: 1px solid transparent;
border-bottom: none;
bottom: -1px;
position: relative;
list-style: none;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 0;
padding-right: 0;
2021-12-03 21:33:46 +01:00
cursor: pointer;
2022-01-07 20:26:10 +01:00
font-size: 0.8125rem;
height: 38px;
2021-12-03 21:33:46 +01:00
.tab-container {
width: 100%;
border-left: 1px solid #dcdcdc;
2022-01-23 13:38:01 +01:00
border-right: 1px solid transparent;
}
2021-12-03 21:33:46 +01:00
&.active {
2022-01-24 23:11:35 +01:00
border-color: var(--color-layout-border);
2021-12-03 21:33:46 +01:00
background: #fff;
border-radius: 5px 5px 0 0;
.tab-container {
border-left: 1px solid transparent;
}
2021-12-03 21:33:46 +01:00
}
2021-12-03 21:33:46 +01:00
.tab-label {
overflow: hidden;
}
.tab-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; }
.close-icon-container {
min-height: 20px;
border-radius: 3px;
2021-12-03 21:33:46 +01:00
.close-icon {
2022-01-23 13:38:01 +01:00
display: none;
2021-12-03 21:33:46 +01:00
color: #9f9f9f;
width: 8px;
padding-bottom: 6px;
padding-top: 6px;
2021-12-03 21:33:46 +01:00
}
&:hover, &:hover .close-icon {
background-color: #eaeaea;
color: rgb(76 76 76);
}
2022-01-23 13:38:01 +01:00
.has-changes-icon {
height: 24px;
}
}
&.active {
2022-01-23 13:38:01 +01:00
.close-icon-container .close-icon {
display: block;
}
}
&:hover{
2022-01-23 13:38:01 +01:00
.close-icon-container .close-icon {
display: block;
2021-12-03 21:33:46 +01:00
}
}
&.new-tab {
vertical-align: bottom;
width: 34px;
padding: 3px 0px;
display: inline-flex;
justify-content: center;
color: rgb(117 117 117);
margin-bottom: 2px;
> div {
padding: 3px 4px;
}
svg {
height: 22px;
}
&:hover {
> div {
background-color: #eaeaea;
color: rgb(76 76 76);
border-radius: 3px;
}
}
}
}
li.last-tab {
.tab-container {
border-right: 1px solid #dcdcdc;
}
&.active {
.tab-container {
border-right: 1px solid transparent;
}
}
}
li.active + li {
.tab-container {
border-left: 1px solid transparent;
}
}
li:first-child {
.tab-container {
border-left: 1px solid transparent;
}
2021-12-03 21:33:46 +01:00
}
}
`;
export default Wrapper;