Skip to content

Commit

Permalink
Merge pull request #52 from hyvor/textInputSize
Browse files Browse the repository at this point in the history
texInput size #49
  • Loading branch information
supun-io authored Dec 26, 2023
2 parents 2a81999 + 79b0a89 commit 639ac22
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/lib/components/TextInput/TextInput.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
export let state : 'default' | 'error' | 'success' | 'warning' = 'default';
export let size : 'small' | 'medium' | 'large' = 'medium';
export let size : 'small' | 'medium' | 'large' | 'x-small' = 'medium';
export let block : boolean = false;
export let value: any = undefined;
Expand Down Expand Up @@ -101,6 +101,13 @@
}
}
.input-wrap.size-x-small {
padding: 0 15px;
height: 26px;
font-size: 12px;
--local-shadow-size: 1px;
}
.input-wrap.size-small {
padding: 0 15px;
height: 30px;
Expand Down
2 changes: 2 additions & 0 deletions src/routes/[[slug]]/docs/TextInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@
<h3 id="sizes">Sizes</h3>

<CodeBlock code={`
<TextInput placeholder="X-Small" size="x-small" />
<TextInput placeholder="Small" size="small" />
<TextInput placeholder="Medium (default)" />
<TextInput placeholder="Large" size="large" />
`} />

<CodeResult>
<div class="sizes">
<TextInput placeholder="X-Small" size="x-small" />
<TextInput placeholder="Small" size="small" />
<TextInput placeholder="Medium (default)" />
<TextInput placeholder="Large" size="large" />
Expand Down

0 comments on commit 639ac22

Please sign in to comment.