1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
Ariella Vu 0917b7c52f
Add alternative summary UI with arrow icon to the Disclosure component (#19770)
* disclosure: add isArrowSummary option w/ UI

* disclosure.scss: add missing trailing semicolon

* Disclosure: replace isArrowSummary -> type prop

* Disclosure: alphabetize props

* Disclosure: add cursor: pointer

* storybook: add Disclosure - Type Arrow

* Disclosure: margin-left: 0 arrow type content

* Disclosure: fix margin-left: 0 arrow type

* Disclosure: support Text media query for Arrow

* Disclosure: clean rn type -> variant

* Disclosure: use size prop for arrow summary text

* Disclosure: update rest of type -> variant

* Disclosure: 1 more type -> variant

* Disclosure: TypeArrow -> VariantArrow
2023-07-13 22:38:42 +02:00

55 lines
837 B
SCSS

.disclosure {
margin: 12px 0;
font-size: 14px;
&__summary {
position: relative;
padding-bottom: 10px;
font-weight: bold;
display: flex;
cursor: pointer;
&::-webkit-details-marker,
&::marker {
display: none;
content: '';
}
}
&__content {
margin-left: 12px;
font-size: 14px;
&.small {
font-size: 12px;
}
}
// Arrow Summary
details[open] {
.disclosure__summary.is-arrow .disclosure__summary--icon {
transform: rotateX(0deg);
}
}
&__summary.is-arrow {
display: flex;
align-items: center;
font-weight: normal;
&:hover {
opacity: 0.5;
}
+ .disclosure__content {
margin-left: 0;
}
.disclosure__summary--icon {
transform: rotateX(180deg);
transition: 0.1s transform;
}
}
}