Skip to content

Commit

Permalink
fix(slider): align editable slider when no label provided (#3816)
Browse files Browse the repository at this point in the history
* fix(slider): track align center when no label provided in editable slider

* fix(slider): updated position of track

* chore(slider): added editable without label story for slider

* chore: updated golden image hash
  • Loading branch information
TarunAdobe authored Nov 24, 2023
1 parent 4349a56 commit a5f4900
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ executors:
parameters:
current_golden_images_hash:
type: string
default: e961862c518bfcb973e1873828f5fd93775ebdd2
default: d8be48bd925210181c3ec6933abbc3aade090bcb
wireit_cache_name:
type: string
default: wireit
Expand Down
4 changes: 4 additions & 0 deletions packages/slider/src/slider.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,7 @@ governing permissions and limitations under the License.
padding: 0;
margin: 0;
}

:host([label-visibility='none']) #track {
align-self: flex-end;
}
26 changes: 26 additions & 0 deletions packages/slider/stories/slider.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,32 @@ export const editableCustom = (args: StoryArgs = {}): TemplateResult => {

editableCustom.decorators = [editableDecorator];

export const editableWithoutVisibleLabels = (
args: StoryArgs = {}
): TemplateResult => {
return html`
<div style="width: 500px; margin: 12px 20px;">
<sp-slider
editable
max="1"
min="0"
value=".5"
step="0.01"
@input=${handleEvent(args)}
@change=${handleEvent(args)}
.formatOptions=${{ style: 'percent' }}
...=${spreadProps(args)}
>
Opacity
</sp-slider>
</div>
`;
};

editableWithoutVisibleLabels.args = {
labelVisibility: 'none',
};

export const hideStepper = (args: StoryArgs = {}): TemplateResult => {
return html`
<div style="width: 500px; margin: 12px 20px;">
Expand Down

0 comments on commit a5f4900

Please sign in to comment.