mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
refactor(components): alphabetize exported props for scannability
This commit is contained in:
parent
d4abc1dfd3
commit
b1fe3de8ad
78 changed files with 265 additions and 264 deletions
|
@ -1,30 +1,30 @@
|
|||
<script>
|
||||
let className = undefined;
|
||||
export { className as class };
|
||||
export const translationIds = { increment: 'increment', decrement: 'decrement' };
|
||||
export let allowEmpty = false;
|
||||
export let disabled = false;
|
||||
export let helperText = '';
|
||||
export let hideLabel = false;
|
||||
export let iconDescription = '';
|
||||
export let id = Math.random();
|
||||
export let label = '';
|
||||
export let max = undefined;
|
||||
export let min = undefined;
|
||||
export let step = 1;
|
||||
export let value = '';
|
||||
export let readonly = false;
|
||||
export let invalid = false;
|
||||
export let invalidText = 'Provide invalidText';
|
||||
export let helperText = '';
|
||||
export let mobile = false;
|
||||
export let label = '';
|
||||
export let light = false;
|
||||
export let allowEmpty = false;
|
||||
export let isMobile = false;
|
||||
export const translationIds = { increment: 'increment', decrement: 'decrement' };
|
||||
export let translateWithId = id => defaultTranslations[id];
|
||||
export let max = undefined;
|
||||
export let min = undefined;
|
||||
export let readonly = false;
|
||||
export let step = 1;
|
||||
export let style = undefined;
|
||||
export let translateWithId = id => defaultTranslations[id];
|
||||
export let value = '';
|
||||
|
||||
import { createEventDispatcher, afterUpdate } from 'svelte';
|
||||
import WarningFilled16 from 'carbon-icons-svelte/lib/WarningFilled16';
|
||||
import CaretDownGlyph from 'carbon-icons-svelte/lib/CaretDownGlyph';
|
||||
import CaretUpGlyph from 'carbon-icons-svelte/lib/CaretUpGlyph';
|
||||
import WarningFilled16 from 'carbon-icons-svelte/lib/WarningFilled16';
|
||||
import { cx } from '../../lib';
|
||||
|
||||
const defaultTranslations = {
|
||||
|
@ -62,8 +62,8 @@
|
|||
<div on:click on:mouseover on:mouseenter on:mouseleave class={cx('--form-item', className)} {style}>
|
||||
<div
|
||||
data-invalid={error || undefined}
|
||||
class={cx('--number', '--number--helpertext', readonly && '--number--readonly', light && '--number--light', hideLabel && '--number--nolabel', isMobile && '--number--mobile')}>
|
||||
{#if isMobile}
|
||||
class={cx('--number', '--number--helpertext', readonly && '--number--readonly', light && '--number--light', hideLabel && '--number--nolabel', mobile && '--number--mobile')}>
|
||||
{#if mobile}
|
||||
{#if label}
|
||||
<label class={cx('--label', hideLabel && '--visually-hidden')} for={id}>
|
||||
<slot name="label">{label}</slot>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue