diff --git a/src/Row.d.ts b/src/Row.d.ts index 74e83d70..5778803d 100644 --- a/src/Row.d.ts +++ b/src/Row.d.ts @@ -16,6 +16,7 @@ export interface RowProps cols?: ColumnProps; noGutters?: boolean; form?: boolean; + inner?: HTMLElement; } export default class Row extends SvelteComponentTyped< diff --git a/src/Row.svelte b/src/Row.svelte index b09ab615..d6957a72 100644 --- a/src/Row.svelte +++ b/src/Row.svelte @@ -6,6 +6,7 @@ export let noGutters = false; export let form = false; export let cols = 0; + export let inner = undefined; function getCols(cols) { const colsValue = parseInt(cols); @@ -37,6 +38,6 @@ ); -
+
diff --git a/src/__test__/Row.spec.js b/src/__test__/Row.spec.js index 88910f10..70f8d197 100644 --- a/src/__test__/Row.spec.js +++ b/src/__test__/Row.spec.js @@ -39,4 +39,10 @@ describe('Row', () => { const row = container.querySelector('.row'); expect(row.className).toBe('row row-cols-sm-2 row-cols-md-3'); }); + + test('should bind inner div', () => { + let inner; + const { container } = render(Row, { props: { class: "test-123", inner }}); + expect(inner.classList).toContain("test-123") + }); });