refactor: 💡 Refactor link list panel (#199)
* refactor: 💡 Refactor link list panel
This commit is contained in:
1 parent
a48fd5d9f4
commit
40cddd829e
4 files changed
+53
-12
No files matched your search
@@ -1,16 +1,29 @@
|
||||
<li>
|
||||
<LinkTo @route={{@route}} @model={{@model}} class='link-list-item'>
|
||||
<li class='link-list-item'>
|
||||
{{#if @route}}
|
||||
<LinkTo @route={{@route}} @model={{@model}}>
|
||||
<div class='link-list-item__info'>
|
||||
{{#if @icon}}
|
||||
<Hds::IconTile @color={{@color}} @icon={{@icon}} @size='small' />
|
||||
{{/if}}
|
||||
|
||||
<div>
|
||||
<p class='link-list-item__text'>{{@text}}</p>
|
||||
{{yield}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<FlightIcon @name='arrow-right' />
|
||||
</LinkTo>
|
||||
{{else}}
|
||||
<div class='link-list-item__info'>
|
||||
{{#if @icon}}
|
||||
<Hds::IconTile @color={{@color}} @icon={{@icon}} @size='small' />
|
||||
{{/if}}
|
||||
|
||||
<div>
|
||||
<p class='link-list-item__text'>{{@text}}</p>
|
||||
{{yield}}
|
||||
</div>
|
||||
</div>
|
||||
{{#if @route}}
|
||||
<FlightIcon @name='arrow-right' />
|
||||
{{/if}}
|
||||
</LinkTo>
|
||||
{{/if}}
|
||||
</li>
|
||||
@@ -674,15 +674,21 @@
|
||||
.link-list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 1rem;
|
||||
text-decoration: none;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&__info {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
margin-left: 0.25rem;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
&__text {
|
||||
|
||||
Reference in new issue
Block a user