Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: transaction list item #1102

Merged
merged 5 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ jobs:

- name: Publish to Chromatic
if: ${{ github.actor != 'dependabot[bot]' && github.ref != 'refs/heads/master' }}
uses: chromaui/action@v1
uses: chromaui/action@v11.4.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

- name: Publish to Chromatic and auto accept changes
if: ${{ github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/main' }}
uses: chromaui/action@v1
uses: chromaui/action@v11.4.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
Expand Down
6 changes: 5 additions & 1 deletion packages/ocean-core/src/components/_list-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
}

.ods-transaction-list-item__information {
margin: 0 $spacing-inline-xs 0 12px;
margin: 0 $spacing-inline-xs 0 0;
overflow: hidden;
width: 100%;

Expand All @@ -125,6 +125,10 @@
}
}

.ods-transaction-list-item__information--with-icon {
margin: 0 $spacing-inline-xs 0 12px;
}

.ods-transaction-list-item__sub-information {
text-align: right;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ const TransactionListItem = React.forwardRef<
>
<div className="ods-transaction-list-item__content">
{icon && <div className="ods-transaction-list-item__icon">{icon}</div>}
<div className="ods-transaction-list-item__information">
<div
className={`ods-transaction-list-item__information ${
icon ? 'ods-transaction-list-item__information--with-icon' : ''
}`}
>
{level4 && (
<div className="ods-transaction-list-item__level4">{level4}</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test('renders default element properly', () => {
class="ods-transaction-list-item__content"
>
<div
class="ods-transaction-list-item__information"
class="ods-transaction-list-item__information "
>
<div
class="ods-transaction-list-item__level1"
Expand Down Expand Up @@ -71,7 +71,7 @@ test('renders default element properly with all possible information', () => {
mock-exclamation-circle-outline
</div>
<div
class="ods-transaction-list-item__information"
class="ods-transaction-list-item__information ods-transaction-list-item__information--with-icon"
>
<div
class="ods-transaction-list-item__level4"
Expand Down Expand Up @@ -151,7 +151,7 @@ test('renders default element properly with sub transaction-list-items', () => {
mock-exclamation-circle-outline
</div>
<div
class="ods-transaction-list-item__information"
class="ods-transaction-list-item__information ods-transaction-list-item__information--with-icon"
>
<div
class="ods-transaction-list-item__level1"
Expand Down Expand Up @@ -182,7 +182,7 @@ test('renders default element properly with sub transaction-list-items', () => {
mock-exclamation-circle-outline
</div>
<div
class="ods-transaction-list-item__information"
class="ods-transaction-list-item__information ods-transaction-list-item__information--with-icon"
>
<div
class="ods-transaction-list-item__level1"
Expand Down
Loading