Skip to content

Commit

Permalink
Readd input size condition
Browse files Browse the repository at this point in the history
  • Loading branch information
imagoiq committed Dec 12, 2023
1 parent 1eb8aa0 commit b244e47
Showing 1 changed file with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ const meta: Meta = {
},
size: {
name: 'Size',
description: 'Sets the size of the component\'s appearance.',
description: "Sets the size of the component's appearance.",
if: {
arg: 'floatingLabel',
truthy: false,
},
control: {
type: 'select',
labels: {
Expand Down Expand Up @@ -187,8 +191,8 @@ function render(args: Args, context: StoryContext) {
const useAriaLabel = !args.floatingLabel && args.hiddenLabel;
const label: TemplateResult | null = !useAriaLabel
? html`
<label for="${id}" class="form-label">${args.label}</label>
`
<label for="${id}" class="form-label">${args.label}</label>
`
: null;

if (args.floatingLabel && !args.placeholder) {
Expand All @@ -198,18 +202,18 @@ function render(args: Args, context: StoryContext) {
const contextual: (TemplateResult | null)[] = [
args.validation === 'is-valid'
? html`
<p class="valid-feedback">Ggranda sukceso!</p>
`
<p class="valid-feedback">Ggranda sukceso!</p>
`
: null,
args.validation === 'is-invalid'
? html`
<p class="invalid-feedback">Eraro okazis!</p>
`
<p class="invalid-feedback">Eraro okazis!</p>
`
: null,
args.hint !== ''
? html`
<div class="form-text">${args.hint}</div>
`
<div class="form-text">${args.hint}</div>
`
: null,
];

Expand Down

0 comments on commit b244e47

Please sign in to comment.