Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow disabling textarea resize
- Loading branch information
Showing
11 changed files
with
383 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<div class="columns margins"> | ||
<div> | ||
<Select bind:value={valueA} label="Standard" disabled> | ||
<Option value="" /> | ||
{#each fruits as fruit} | ||
<Option value={fruit}>{fruit}</Option> | ||
{/each} | ||
</Select> | ||
|
||
<pre class="status">Selected: {valueA}</pre> | ||
</div> | ||
|
||
<div> | ||
<Select variant="filled" bind:value={valueB} label="Filled" disabled> | ||
<Option value="" /> | ||
{#each fruits as fruit} | ||
<Option value={fruit}>{fruit}</Option> | ||
{/each} | ||
</Select> | ||
|
||
<pre class="status">Selected: {valueB}</pre> | ||
</div> | ||
|
||
<div> | ||
<Select variant="outlined" bind:value={valueC} label="Outlined" disabled> | ||
<Option value="" /> | ||
{#each fruits as fruit} | ||
<Option value={fruit}>{fruit}</Option> | ||
{/each} | ||
</Select> | ||
|
||
<pre class="status">Selected: {valueC}</pre> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
import Select, { Option } from '@smui/select'; | ||
let fruits = ['Apple', 'Orange', 'Banana', 'Mango']; | ||
let valueA = ''; | ||
let valueB = ''; | ||
let valueC = ''; | ||
</script> | ||
|
||
<style> | ||
.margins { | ||
margin: 18px 0 24px; | ||
} | ||
.columns { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-between; | ||
} | ||
.columns > * { | ||
margin-left: 12px; | ||
} | ||
.columns > *:first-child { | ||
margin-left: 0; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<div class="columns margins"> | ||
<div> | ||
<Select bind:value={valueA} label="Standard" required> | ||
<Option value="" /> | ||
{#each fruits as fruit} | ||
<Option value={fruit}>{fruit}</Option> | ||
{/each} | ||
</Select> | ||
|
||
<pre class="status">Selected: {valueA}</pre> | ||
</div> | ||
|
||
<div> | ||
<Select variant="filled" bind:value={valueB} label="Filled" required> | ||
<Option value="" /> | ||
{#each fruits as fruit} | ||
<Option value={fruit}>{fruit}</Option> | ||
{/each} | ||
</Select> | ||
|
||
<pre class="status">Selected: {valueB}</pre> | ||
</div> | ||
|
||
<div> | ||
<Select variant="outlined" bind:value={valueC} label="Outlined" required> | ||
<Option value="" /> | ||
{#each fruits as fruit} | ||
<Option value={fruit}>{fruit}</Option> | ||
{/each} | ||
</Select> | ||
|
||
<pre class="status">Selected: {valueC}</pre> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
import Select, { Option } from '@smui/select'; | ||
let fruits = ['Apple', 'Orange', 'Banana', 'Mango']; | ||
let valueA = ''; | ||
let valueB = ''; | ||
let valueC = ''; | ||
</script> | ||
|
||
<style> | ||
.margins { | ||
margin: 18px 0 24px; | ||
} | ||
.columns { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-between; | ||
} | ||
.columns > * { | ||
margin-left: 12px; | ||
} | ||
.columns > *:first-child { | ||
margin-left: 0; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<div class="margins"> | ||
<Textfield | ||
textarea | ||
bind:value | ||
label="Label" | ||
input$rows="6" | ||
input$cols="18" | ||
input$resizable={false} | ||
> | ||
<HelperText slot="helper">Helper Text</HelperText> | ||
</Textfield> | ||
</div> | ||
|
||
<script> | ||
import Textfield from '@smui/textfield'; | ||
import HelperText from '@smui/textfield/helper-text/index'; | ||
let value = ''; | ||
</script> | ||
|
||
<style> | ||
.margins { | ||
margin: 18px 0 24px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<div class="columns margins"> | ||
<div> | ||
<Textfield | ||
bind:value={valueA} | ||
label="Standard" | ||
prefix="$" | ||
input$pattern={'\\d+(\\.\\d{2})?'} | ||
/> | ||
|
||
<pre class="status">Value: {valueA}</pre> | ||
</div> | ||
<div> | ||
<Textfield | ||
variant="filled" | ||
bind:value={valueB} | ||
label="Filled" | ||
prefix="$" | ||
input$pattern={'\\d+(\\.\\d{2})?'} | ||
/> | ||
|
||
<pre class="status">Value: {valueB}</pre> | ||
</div> | ||
<div> | ||
<Textfield | ||
variant="outlined" | ||
bind:value={valueC} | ||
label="Outlined" | ||
prefix="$" | ||
input$pattern={'\\d+(\\.\\d{2})?'} | ||
/> | ||
|
||
<pre class="status">Value: {valueC}</pre> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
import Textfield from '@smui/textfield'; | ||
let valueA = ''; | ||
let valueB = ''; | ||
let valueC = ''; | ||
</script> | ||
|
||
<style> | ||
.margins { | ||
margin: 18px 0 24px; | ||
} | ||
.columns { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-between; | ||
} | ||
.columns > * { | ||
flex-basis: 0; | ||
min-width: 218px; | ||
} | ||
.columns :global(.mdc-text-field) { | ||
width: 218px; | ||
} | ||
.columns .status { | ||
width: auto; | ||
word-break: break-all; | ||
overflow-wrap: break-word; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<div class="columns margins"> | ||
<div> | ||
<Textfield bind:value={valueA} label="Standard" required /> | ||
|
||
<pre class="status">Value: {valueA}</pre> | ||
</div> | ||
<div> | ||
<Textfield variant="filled" bind:value={valueB} label="Filled" required /> | ||
|
||
<pre class="status">Value: {valueB}</pre> | ||
</div> | ||
<div> | ||
<Textfield | ||
variant="outlined" | ||
bind:value={valueC} | ||
label="Outlined" | ||
required | ||
/> | ||
|
||
<pre class="status">Value: {valueC}</pre> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
import Textfield from '@smui/textfield'; | ||
let valueA = ''; | ||
let valueB = ''; | ||
let valueC = ''; | ||
</script> | ||
|
||
<style> | ||
.margins { | ||
margin: 18px 0 24px; | ||
} | ||
.columns { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-between; | ||
} | ||
.columns > * { | ||
flex-basis: 0; | ||
min-width: 218px; | ||
} | ||
.columns :global(.mdc-text-field) { | ||
width: 218px; | ||
} | ||
.columns .status { | ||
width: auto; | ||
word-break: break-all; | ||
overflow-wrap: break-word; | ||
} | ||
</style> |
Oops, something went wrong.