This repository has been archived by the owner on Aug 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f1195a
commit cc72748
Showing
21 changed files
with
134 additions
and
120 deletions.
There are no files selected for viewing
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<template> | ||
<div class="fd-col" :class="classes"> | ||
<slot /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
// Column-component – used together with `fd-container`. | ||
export default { | ||
name: "FdCol", | ||
props: { | ||
// Number of columns to span | ||
span: { | ||
type: Number, | ||
// `null` – width is automatically computed | ||
default: null | ||
}, | ||
// Number of columns to shift the column | ||
shiftBy: { | ||
type: Number, | ||
// `null` – no shifting | ||
default: null | ||
} | ||
}, | ||
computed: { | ||
classes() { | ||
const { span, shiftBy } = this; | ||
return [ | ||
span == null ? "" : `fd-col--${span}`, | ||
shiftBy == null ? "" : `fd-col--shift-${shiftBy}` | ||
]; | ||
} | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import FdCol from "./_col.vue"; | ||
import { pluginify } from "./../../util"; | ||
export default pluginify(FdCol); | ||
export { default as Col } from "./_col.vue"; |
7 changes: 5 additions & 2 deletions
7
src/components/Layout/Container.vue → src/components/container/_container.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import FdContainer from "./_container.vue"; | ||
import { pluginify } from "./../../util"; | ||
export default pluginify(FdContainer); | ||
export { default as Container } from "./_container.vue"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import FdSection from "./section.vue"; | ||
import FdSectionTitle from "./section-title.vue"; | ||
import FdSectionHeader from "./section-header.vue"; | ||
import { pluginify } from "./../../util"; | ||
export default pluginify(FdSection, FdSectionTitle, FdSectionHeader); | ||
export { default as Section } from "./section.vue"; | ||
export { default as SectionTitle } from "./section-title.vue"; | ||
export { default as SectionHeader } from "./section-header.vue"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<template> | ||
<div class="fd-section__header"><slot /></div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "FdSectionHeader" | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script> | ||
export default { | ||
name: "FdSectionTitle", | ||
props: { | ||
tag: { | ||
type: String, | ||
default: "h3" | ||
} | ||
}, | ||
render(h) { | ||
const tag = this.tag; | ||
return h(tag, { class: "fd-section__title" }, [this.$slots.default]); | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<template> | ||
<section class="fd-section"> | ||
<slot name="header" /> | ||
<slot /> | ||
</section> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "FdSection" | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
--- | ||
fdRelatedComponents: | ||
- fd-section | ||
- fd-section-header | ||
- fd-section-title | ||
- fd-panel | ||
- fd-panel-grid | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 12 additions & 10 deletions
22
src/docs/content/examples/container/3-container-fluid-with-cols.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<fd-container centered> | ||
<fd-col :shift-by="2" :span="3" v-fd-bg:neutral-2>Content</fd-col> | ||
</fd-container> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
<template> | ||
<fd-section title="Section title"> | ||
<fd-section> | ||
<template #header> | ||
<fd-section-header> | ||
<fd-section-title>Section title</fd-section-title> | ||
</fd-section-header> | ||
</template> | ||
<fd-panel>Panel</fd-panel> | ||
</fd-section> | ||
</template> |