Skip to content

Commit

Permalink
fix(mox): fix layout + alignment of mox:input + mox:theme-switch comp
Browse files Browse the repository at this point in the history
  • Loading branch information
jayjayjpg committed Jul 26, 2023
1 parent 7903d9a commit b5e7078
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion addon/components/mox/input.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{#if @label}}
<Mox::Label for={{@id}} @isRequired={{@isRequired}}>{{@label}}</Mox::Label>
{{/if}}
<div class="flex flex-col justify-center space-y-1">
<div class="flex flex-col justify-center space-y-1 w-full">
<input
id={{@id}}
type="text"
Expand Down
1 change: 0 additions & 1 deletion addon/styles/mx-ui-components.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
.mox-theme-switch input:checked::after,
.mox-theme-switch-icon.is-checked {
transform: translateX(15px);
background-color: #fff;
}

.mox-theme-switch input:checked::after {
Expand Down
4 changes: 3 additions & 1 deletion stories/mox-input-light.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,21 @@ export default {

const Template = (args) => ({
template: hbs`
<div class="w-48">
<Mox::Input
@value={{this.value}} @onInput={{this.inputAction}}
@placeholder={{this.placeholder}} @label={{this.label}}
disabled={{this.isDisabled}} @isRequired={{this.isRequired}}
readonly={{this.readOnly}}
@isValid={{this.isValid}} @error={{this.error}} />
</div>
`,
context: args,
});

const TemplateStackedFormFields = (args) => ({
template: hbs`
<div class="flex flex-col">
<div class="flex flex-col w-48">
<Mox::Input
@value={{this.value}} @onInput={{this.inputAction}}
@placeholder={{this.placeholder}} @label={{this.label}}
Expand Down
4 changes: 2 additions & 2 deletions stories/mox-input.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {

const Template = (args) => ({
template: hbs`
<div class="dark">
<div class="dark w-48">
<Mox::Input
@value={{this.value}} @onInput={{this.inputAction}}
@placeholder={{this.placeholder}} @label={{this.label}}
Expand All @@ -25,7 +25,7 @@ const Template = (args) => ({

const TemplateStackedFormFields = (args) => ({
template: hbs`
<div class="dark flex flex-col">
<div class="dark flex flex-col w-48">
<Mox::Input
@value={{this.value}} @onInput={{this.inputAction}}
@placeholder={{this.placeholder}} @label={{this.label}}
Expand Down

0 comments on commit b5e7078

Please sign in to comment.