Skip to content
This repository was archived by the owner on Aug 2, 2024. It is now read-only.

Commit cc72748

Browse files
fix: small fixes
1 parent 3f1195a commit cc72748

File tree

21 files changed

+134
-120
lines changed

21 files changed

+134
-120
lines changed
File renamed without changes.

src/components/Layout/Col.vue

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/components/Layout/Section.vue

Lines changed: 0 additions & 24 deletions
This file was deleted.
File renamed without changes.

src/components/Layout/Ui.vue

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/components/Layout/index.js

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
1-
import Container from "./Container.vue";
2-
import Col from "./Col.vue";
3-
import Section from "./Section.vue";
4-
import Ui from "./Ui.vue";
5-
import App from "./App/_app.vue";
1+
import App from "./App/app.vue";
62
import AppMain from "./App/app-main.vue";
73
import AppNavigation from "./App/app-navigation.vue";
8-
import Shell from "./Shell/_shell.vue";
4+
import Shell from "./Shell/shell.vue";
95
import ShellHeader from "./Shell/shell-header.vue";
106
import ShellApp from "./Shell/shell-app.vue";
117
import ShellFooter from "./Shell/shell-footer.vue";
128
import * as ShellBar from "./ShellBar";
139
import { pluginify, objectValues } from "./../../util";
1410

1511
export default pluginify(
16-
Container,
17-
Col,
18-
Section,
19-
Ui,
2012
App,
2113
AppMain,
2214
AppNavigation,
@@ -27,16 +19,4 @@ export default pluginify(
2719
...objectValues(ShellBar)
2820
);
2921

30-
export {
31-
Container,
32-
Col,
33-
Section,
34-
Ui,
35-
App,
36-
AppMain,
37-
AppNavigation,
38-
Shell,
39-
ShellHeader,
40-
ShellFooter,
41-
ShellApp
42-
};
22+
export { App, AppMain, AppNavigation, Shell, ShellHeader, ShellFooter, ShellApp };

src/components/col/_col.vue

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<template>
2+
<div class="fd-col" :class="classes">
3+
<slot />
4+
</div>
5+
</template>
6+
7+
<script>
8+
// Column-component – used together with `fd-container`.
9+
export default {
10+
name: "FdCol",
11+
props: {
12+
// Number of columns to span
13+
span: {
14+
type: Number,
15+
// `null` – width is automatically computed
16+
default: null
17+
},
18+
// Number of columns to shift the column
19+
shiftBy: {
20+
type: Number,
21+
// `null` – no shifting
22+
default: null
23+
}
24+
},
25+
computed: {
26+
classes() {
27+
const { span, shiftBy } = this;
28+
return [
29+
span == null ? "" : `fd-col--${span}`,
30+
shiftBy == null ? "" : `fd-col--shift-${shiftBy}`
31+
];
32+
}
33+
}
34+
};
35+
</script>

src/components/col/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import FdCol from "./_col.vue";
2+
import { pluginify } from "./../../util";
3+
export default pluginify(FdCol);
4+
export { default as Col } from "./_col.vue";

src/components/Layout/Container.vue renamed to src/components/container/_container.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
<template>
2-
<div :class="classes">
2+
<div class="fd-container" :class="classes">
3+
<!-- Content – or 0…12 instances of `fd-col` -->
34
<slot />
45
</div>
56
</template>
67

78
<script>
9+
// Container component – should contains `fd-col`-instances.
810
export default {
911
name: "FdContainer",
1012
props: {
13+
// If `true`, the container will act as a flexbox.
1114
flex: { type: Boolean, default: false },
1215
fluid: { type: Boolean, default: false },
16+
// If `true`, the wrapper is centered within it's parent.
1317
centered: { type: Boolean, default: false }
1418
},
1519
computed: {
1620
classes() {
1721
return {
18-
"fd-container": true,
1922
"fd-container--flex": this.flex,
2023
"fd-container--fluid": this.fluid,
2124
"fd-container--centered": this.centered

src/components/container/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import FdContainer from "./_container.vue";
2+
import { pluginify } from "./../../util";
3+
export default pluginify(FdContainer);
4+
export { default as Container } from "./_container.vue";

0 commit comments

Comments
 (0)