Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
mishankov committed Mar 12, 2024
1 parent 88094bf commit b5976d4
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 deletions.
20 changes: 10 additions & 10 deletions src/lib/components/RadioButton.svelte
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<script lang="ts">
interface Option {
value: string;
label: string;
}
interface Option {
value: string;
label: string;
}
export let options: Option[];
export let selected: string;
export let options: Option[];
export let selected: string;
</script>

{#each options as option}
<label>
<input type="radio" bind:group={selected} value={option.value} />
{option.label}
</label>
<label>
<input type="radio" bind:group={selected} value={option.value} />
{option.label}
</label>
{/each}
46 changes: 23 additions & 23 deletions src/lib/manipulations/components/Trim.svelte
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
<script lang="ts" context="module">
import type { ManipulationBase } from '..';
import RadioButton from '$lib/components/RadioButton.svelte';
import type { ManipulationBase } from '..';
import RadioButton from '$lib/components/RadioButton.svelte';
export interface TrimManipulation extends ManipulationBase {
type: 'trim';
trimType: string;
}
export interface TrimManipulation extends ManipulationBase {
type: 'trim';
trimType: string;
}
const options = [
{
value: 'leading',
label: 'Leading'
},
{
value: 'trailing',
label: 'Trailing'
},
{
value: 'all',
label: 'All'
}
]
const options = [
{
value: 'leading',
label: 'Leading'
},
{
value: 'trailing',
label: 'Trailing'
},
{
value: 'all',
label: 'All'
}
];
</script>

<script lang="ts">
export let { trimType }: TrimManipulation = { trimType: 'all', type: 'trim' };
export let { trimType }: TrimManipulation = { trimType: 'all', type: 'trim' };
</script>

<div>
<span>Trim </span>
<RadioButton bind:selected={trimType} options={options} />
<span>Trim </span>
<RadioButton bind:selected={trimType} {options} />
</div>

<style>
Expand Down

0 comments on commit b5976d4

Please sign in to comment.