Skip to content

Commit

Permalink
[FLASK] Fix classnames for snaps components (#19234)
Browse files Browse the repository at this point in the history
* renamed classnames according to BEM, removed unnecessary scss file

* remove plurality in classnames
  • Loading branch information
hmalik88 authored May 23, 2023
1 parent dfb2c0e commit a9429c5
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 92 deletions.
1 change: 0 additions & 1 deletion ui/components/app/app-components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
@import 'snaps/snap-ui-markdown/index';
@import 'snaps/snap-delineator/index';
@import 'snaps/snap-settings-card/index';
@import 'snaps/update-snap-permission-list/index';
@import 'snaps/copyable/index';
@import 'snaps/snap-version/index';
@import 'gas-details-item/index';
Expand Down
62 changes: 0 additions & 62 deletions ui/components/app/snaps/update-snap-permission-list/index.scss

This file was deleted.

4 changes: 2 additions & 2 deletions ui/pages/permissions-connect/snaps/snap-install/index.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.snap-install {
box-shadow: none;

.content {
&__content {
flex: 1;

.loader-container {
&__loader-container {
height: 100%;
}

Expand Down
10 changes: 5 additions & 5 deletions ui/pages/permissions-connect/snaps/snap-install/snap-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default function SnapInstall({
flexDirection={FLEX_DIRECTION.COLUMN}
>
<Box
className="header"
className="snap-install__header"
alignItems={AlignItems.center}
paddingLeft={4}
paddingRight={4}
Expand All @@ -101,10 +101,10 @@ export default function SnapInstall({
</Text>
)}
</Box>
<Box className="content">
<Box className="snap-install__content">
{isLoading && (
<Box
className="loader-container"
className="snap-install__content__loader-container"
flexDirection={FLEX_DIRECTION.COLUMN}
alignItems={AlignItems.center}
justifyContent={JustifyContent.center}
Expand All @@ -118,7 +118,7 @@ export default function SnapInstall({
{hasPermissions && (
<>
<Text
className="content__permission-description"
className="snap-install__content__permission-description"
paddingBottom={4}
paddingLeft={4}
paddingRight={4}
Expand Down Expand Up @@ -152,7 +152,7 @@ export default function SnapInstall({
)}
</Box>
<Box
className="footers"
className="snap-install__footer"
alignItems={AlignItems.center}
flexDirection={FLEX_DIRECTION.COLUMN}
>
Expand Down
4 changes: 2 additions & 2 deletions ui/pages/permissions-connect/snaps/snap-result/index.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.snap-result {
box-shadow: none;

.headers {
&__header {
flex: 1;

.loader-container {
&__loader-container {
height: 100%;
}
}
Expand Down
6 changes: 3 additions & 3 deletions ui/pages/permissions-connect/snaps/snap-result/snap-result.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function SnapResult({
flexDirection={FLEX_DIRECTION.COLUMN}
>
<Box
className="headers"
className="snap-result__header"
paddingLeft={4}
paddingRight={4}
alignItems={AlignItems.center}
Expand All @@ -57,7 +57,7 @@ export default function SnapResult({
<SnapAuthorship snapId={targetSubjectMetadata.origin} />
{isLoading && (
<Box
className="loader-container"
className="snap-result__header__loader-container"
flexDirection={FLEX_DIRECTION.COLUMN}
alignItems={AlignItems.center}
justifyContent={JustifyContent.center}
Expand Down Expand Up @@ -94,7 +94,7 @@ export default function SnapResult({
)}
</Box>
<Box
className="footers"
className="snap-result__footer"
alignItems={AlignItems.center}
flexDirection={FLEX_DIRECTION.COLUMN}
>
Expand Down
14 changes: 2 additions & 12 deletions ui/pages/permissions-connect/snaps/snap-update/index.scss
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
.snap-update {
box-shadow: none;

.content {
&__content {
flex: 1;

.loader-container {
&__loader-container {
height: 100%;
}

.update-snap-permission-list {
padding: 0 24px;

.new-permission,
.approved-permission,
.revoked-permission {
padding: 8px 0;
}
}

&__permission-description {
border-bottom: 1px solid var(--color-border-default);
}
Expand Down
10 changes: 5 additions & 5 deletions ui/pages/permissions-connect/snaps/snap-update/snap-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default function SnapUpdate({
flexDirection={FLEX_DIRECTION.COLUMN}
>
<Box
className="header"
className="snap-update__header"
paddingLeft={4}
paddingRight={4}
alignItems={AlignItems.center}
Expand All @@ -107,10 +107,10 @@ export default function SnapUpdate({
</Text>
)}
</Box>
<Box className="content">
<Box className="snap-update__content">
{isLoading && (
<Box
className="loader-container"
className="snap-update__content__loader-container"
flexDirection={FLEX_DIRECTION.COLUMN}
alignItems={AlignItems.center}
justifyContent={JustifyContent.center}
Expand All @@ -124,7 +124,7 @@ export default function SnapUpdate({
{hasPermissions && (
<>
<Text
className="content__permission-description"
className="snap-update__content__permission-description"
paddingBottom={4}
paddingLeft={4}
paddingRight={4}
Expand Down Expand Up @@ -160,7 +160,7 @@ export default function SnapUpdate({
)}
</Box>
<Box
className="footers"
className="snap-update__footer"
alignItems={AlignItems.center}
flexDirection={FLEX_DIRECTION.COLUMN}
>
Expand Down

0 comments on commit a9429c5

Please sign in to comment.