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

Replace settings icon #827

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion src/core/panel/plugin-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export abstract class UIPPluginPanel extends UIPPlugin {
const hasToolbar = this.$toolbar?.children.length;
return (
<div className={type.is + '-header uip-plugin-header' + (this.label ? '' : ' no-label') + (hasToolbar ? ' has-toolbar' : '')}>
{this.$icon ? <span className='uip-plugin-header-icon' title={this.label}>{this.$icon}</span> : ''}
Natalie-Smirnova marked this conversation as resolved.
Show resolved Hide resolved
{this.$icon ? <span className='uip-plugin-header-icon' title={this.label}></span> : ''}
<span class={`uip-plugin-header-title ${type.is}-title`}>{this.label}</span>
{this.collapsible ? <button type='button' className='uip-plugin-header-trigger' aria-label={a11yLabel} title={a11yLabel}/> : ''}
{hasToolbar ? this.$toolbar : ''}
Expand Down
23 changes: 21 additions & 2 deletions src/plugins/settings/settings.less
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,31 @@ uip-settings {
height: 1.25rem;
}

.uip-plugin-header-icon {
&::after {
content: '';
position: relative;
top: 4px;
width: 10px;
height: 10px;
pointer-events: none;
border-left: 2px solid currentColor;
border-top: 2px solid currentColor;
transition: transform 0.5s ease-in-out, top 0.5s ease-in-out;
}
}

// Rotate on collapsed state change
&[collapsed] .uip-plugin-header-icon {
animation: rotate 0.5s linear both;
&::after {
transform: rotate(315deg);
left: 5px;
}
}
&:not([collapsed]) .uip-plugin-header-icon {
animation: rotate-back 0.5s linear both;
&::after {
transform: rotate(135deg);
}
}
}

Expand Down
1 change: 1 addition & 0 deletions src/plugins/snippets/snippets.less
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
.uip-snippets-item {
font-weight: 400;
padding: 6px 24px 8px;
text-align: start;
}

.uip-snippets-item-wrapper {
Expand Down
Loading