Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Commit

Permalink
fix(Grid): fixed col class
Browse files Browse the repository at this point in the history
  • Loading branch information
TheComputerM committed Aug 13, 2020
1 parent 0340c9d commit 36e8f85
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions packages/svelte-materialify/src/components/Grid/Col.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<script context="module">
function parseSettings(objects) {
return Object.keys(objects)
.map((i) => (objects[i] ? `${i}-${objects[i]}` : ''))
.filter((i) => i !== '')
.join(' ');
}
</script>

<script>
let classes = '';
export let cols = false;
Expand All @@ -13,14 +22,8 @@
export let style = null;
export { classes as class };
function classnames(objects) {
return Object.keys(objects)
.map((i) => `${i}-${objects[i]}`)
.join(' ');
}
$: settings = classnames({
cols,
$: settings = parseSettings({
col: cols,
sm,
md,
lg,
Expand Down

0 comments on commit 36e8f85

Please sign in to comment.