refactor(components): convert const to reactive where appropriate

- Inline class assignments to avoid script-level clutter
- Ignore a11y-missing-attribute instead of redundant href
This commit is contained in:
Eric Liu 2019-12-24 09:41:12 -08:00
commit c446fc74f4
94 changed files with 469 additions and 598 deletions

View file

@ -2,21 +2,19 @@
let className = undefined;
export { className as class };
export let border = false;
export let rowCount = 5;
export let rows = 5;
export let style = undefined;
import { cx, fillArray } from '../../lib';
const _class = cx(
'--skeleton',
'--structured-list',
border && '--structured-list--border',
className
);
const rows = fillArray(rowCount - 1);
</script>
<section on:click on:mouseover on:mouseenter on:mouseleave class={_class} {style}>
<section
on:click
on:mouseover
on:mouseenter
on:mouseleave
class={cx('--skeleton', '--structured-list', border && '--structured-list--border', className)}
{style}>
<div class={cx('--structured-list-thead')}>
<div class={cx('--structured-list-row', '--structured-list-row--header-row')}>
<div class={cx('--structured-list-th')}>
@ -31,7 +29,7 @@
</div>
</div>
<div class={cx('--structured-list-tbody')}>
{#each rows as row, i (row)}
{#each fillArray(rows) as row, i (row)}
<div class={cx('--structured-list-row')}>
<div class={cx('--structured-list-td')} />
<div class={cx('--structured-list-td')} />