This repository has been archived by the owner on Mar 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Showing
7 changed files
with
187 additions
and
58 deletions.
There are no files selected for viewing
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,53 @@ | ||
<template> | ||
<div class="card"> | ||
<div v-if="title" id="card-titlebar"> | ||
<h5>{{title}}</h5> | ||
</div> | ||
<div id="card-content"> | ||
<slot/> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import {Vue, Component, Prop} from "vue-property-decorator"; | ||
@Component({ | ||
components: {}, | ||
}) | ||
export default class Card extends Vue { | ||
@Prop(String) private title?: string; | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.card { | ||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); | ||
transition: 0.3s; | ||
margin: 20px 5px; | ||
background-color: #fbfbfb; | ||
} | ||
.card:hover { | ||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2); | ||
} | ||
#card-content { | ||
padding: 20px 10px 10px 10px; | ||
} | ||
#card-titlebar { | ||
width: 100%; | ||
display: flex; | ||
flex-wrap: nowrap; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: #004578; | ||
color: white; | ||
} | ||
h5 { | ||
padding: 2px 0; | ||
margin: 0; | ||
} | ||
</style> |
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
56 changes: 49 additions & 7 deletions
56
packages/documentation/src/views/components/Button/OfficeButton.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 |
---|---|---|
@@ -1,31 +1,73 @@ | ||
<template> | ||
<div> | ||
<OverviewItem title="Button" :options="options"> | ||
<OverviewItem title="Playground" :options="options"> | ||
<template slot-scope="props"> | ||
<OfficeButton v-bind="props"></OfficeButton> | ||
</template> | ||
</OverviewItem> | ||
|
||
<Card title="Examples" id="example-card"> | ||
<div id="example-button-container"> | ||
<OfficeButton label="Default Button"></OfficeButton> | ||
<OfficeButton primary label="Primary Button"></OfficeButton> | ||
<OfficeButton checked label="Checked Button"></OfficeButton> | ||
<OfficeButton primary checked label="Primary Checked Button"></OfficeButton> | ||
<OfficeButton disabled label="Disabled Button"></OfficeButton> | ||
</div> | ||
<div id="example-code"> | ||
<OfficeLabel>Code:</OfficeLabel> | ||
<highlight-code lang="vue" style="text-align: left"> | ||
{{ exampleCode }} | ||
</highlight-code> | ||
</div> | ||
</Card> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import {DemoInputTypes} from "@/components/DemoInputs/DemoInputTypes"; | ||
import Card from "@/components/Card.vue"; | ||
import {DemoInputTypes} from "@/components/DemoInputs/DemoInputTypes"; | ||
import OverviewItem, {IItemOptions} from "@/components/OverviewItem.vue"; | ||
import {Component, Vue} from "vue-property-decorator"; | ||
import {OfficeButton} from "office-vue-fabric"; | ||
import OfficeLabel from "office-vue-fabric/src/Label/OfficeLabel.vue"; | ||
import {Component, Vue} from "vue-property-decorator"; | ||
import {OfficeButton} from "office-vue-fabric"; | ||
import exampleCode from "./buttons.example"; | ||
@Component({ | ||
components: { | ||
OfficeLabel, | ||
OverviewItem, | ||
OfficeButton, | ||
Card | ||
}, | ||
}) | ||
export default class extends Vue { | ||
private exampleCode = exampleCode; | ||
private options: IItemOptions = { | ||
disabled: {type: DemoInputTypes.BooleanToggle}, | ||
primary: {type: DemoInputTypes.BooleanToggle, value: true}, | ||
checked: {type: DemoInputTypes.BooleanToggle}, | ||
label: {type: DemoInputTypes.StringInput, value: "Default Button", options: {width: "150px"}}, | ||
primary: {type: DemoInputTypes.BooleanToggle, value: true}, | ||
checked: {type: DemoInputTypes.BooleanToggle}, | ||
label: {type: DemoInputTypes.StringInput, value: "Default Button", options: {width: "150px"}}, | ||
}; | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
#example-code { | ||
border-top: 1px solid rgba(0,0,0,0.2); | ||
margin-top: 25px; | ||
padding-top: 25px; | ||
} | ||
#example-code .ms-Label { | ||
margin-left: 5px; | ||
} | ||
#example-button-container .ms-Button { | ||
width: 250px; | ||
display: inline-block; | ||
margin-right: 15px; | ||
margin-bottom: 15px; | ||
} | ||
</style> |
5 changes: 5 additions & 0 deletions
5
packages/documentation/src/views/components/Button/buttons.example
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 @@ | ||
<OfficeButton label="Default Button"></OfficeButton> | ||
<OfficeButton primary label="Primary Button"></OfficeButton> | ||
<OfficeButton checked label="Checked Button"></OfficeButton> | ||
<OfficeButton primary checked label="Primary Checked Button"></OfficeButton> | ||
<OfficeButton disabled label="Disabled Button"></OfficeButton> |
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
78 changes: 62 additions & 16 deletions
78
packages/documentation/src/views/components/TextField/OfficeTextField.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 |
---|---|---|
@@ -1,39 +1,85 @@ | ||
<template> | ||
<div> | ||
<OverviewItem title="Text Field" :options="options"> | ||
<OverviewItem title="Playground" :options="options"> | ||
<template slot-scope="props"> | ||
<OfficeTextField v-bind="props"></OfficeTextField> | ||
</template> | ||
</OverviewItem> | ||
|
||
<Card title="Examples" id="example-card"> | ||
<div id="example-container"> | ||
<OfficeTextField label="Sample Input"></OfficeTextField> | ||
<OfficeTextField label="Disabled Input" disabled></OfficeTextField> | ||
<OfficeTextField label="Sample Input with Icon" :iconProps="{iconName: 'edit'}"></OfficeTextField> | ||
<OfficeTextField label="Sample Input with Prefix and Suffix" prefix="http://" suffix=".com"></OfficeTextField> | ||
<OfficeTextField label="Borderless Input" borderless></OfficeTextField> | ||
<OfficeTextField label="Underlined Input" underlined></OfficeTextField> | ||
<OfficeTextField label="Error Input" errorMessage="Invalid Input"></OfficeTextField> | ||
<OfficeTextField label="Multiline Input with auto height" multiline autoAdjustHeight></OfficeTextField> | ||
</div> | ||
<div id="example-code"> | ||
<OfficeLabel>Code:</OfficeLabel> | ||
<highlight-code lang="vue" style="text-align: left"> | ||
{{ exampleCode }} | ||
</highlight-code> | ||
</div> | ||
</Card> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import {DemoInputTypes} from "@/components/DemoInputs/DemoInputTypes"; | ||
import OverviewItem, {IItemOptions} from "@/components/OverviewItem.vue"; | ||
import {Component, Vue} from "vue-property-decorator"; | ||
import {OfficeTextField} from "office-vue-fabric"; | ||
import Card from "@/components/Card.vue"; | ||
import {DemoInputTypes} from "@/components/DemoInputs/DemoInputTypes"; | ||
import OverviewItem, {IItemOptions} from "@/components/OverviewItem.vue"; | ||
import {Component, Vue} from "vue-property-decorator"; | ||
import {OfficeTextField, OfficeLabel} from "office-vue-fabric"; | ||
import exampleCode from "./textfields.example"; | ||
@Component({ | ||
components: { | ||
OfficeTextField, | ||
OverviewItem, | ||
Card, | ||
OfficeLabel, | ||
}, | ||
}) | ||
export default class extends Vue { | ||
private exampleCode = exampleCode; | ||
private options: IItemOptions = { | ||
disabled: {type: DemoInputTypes.BooleanToggle}, | ||
multiline: {type: DemoInputTypes.BooleanToggle}, | ||
required: {type: DemoInputTypes.BooleanToggle}, | ||
resizable: {type: DemoInputTypes.BooleanToggle}, | ||
underlined: {type: DemoInputTypes.BooleanToggle}, | ||
borderless: {type: DemoInputTypes.BooleanToggle}, | ||
disabled: {type: DemoInputTypes.BooleanToggle}, | ||
multiline: {type: DemoInputTypes.BooleanToggle}, | ||
required: {type: DemoInputTypes.BooleanToggle}, | ||
resizable: {type: DemoInputTypes.BooleanToggle}, | ||
underlined: {type: DemoInputTypes.BooleanToggle}, | ||
borderless: {type: DemoInputTypes.BooleanToggle}, | ||
autoAdjustHeight: {type: DemoInputTypes.BooleanToggle}, | ||
iconProps: {type: DemoInputTypes.BooleanToggle, options: {value: {iconName: "edit"}}}, | ||
label: {type: DemoInputTypes.StringInput, value: "Example Input", options: {width: "250px"}}, | ||
errorMessage: {type: DemoInputTypes.StringInput, value: "This input is invalid!", options: {width: "250px"}}, | ||
prefix: {type: DemoInputTypes.StringInput, value: ""}, | ||
suffix: {type: DemoInputTypes.StringInput, value: ""}, | ||
iconProps: {type: DemoInputTypes.BooleanToggle, options: {value: {iconName: "edit"}}}, | ||
label: {type: DemoInputTypes.StringInput, value: "Example Input", options: {width: "250px"}}, | ||
errorMessage: { | ||
type: DemoInputTypes.StringInput, | ||
value: "This input is invalid!", | ||
options: {width: "250px"} | ||
}, | ||
prefix: {type: DemoInputTypes.StringInput, value: ""}, | ||
suffix: {type: DemoInputTypes.StringInput, value: ""}, | ||
}; | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
#example-container .ms-TextField { | ||
margin-bottom: 5px; | ||
} | ||
#example-code { | ||
border-top: 1px solid rgba(0,0,0,0.2); | ||
margin-top: 25px; | ||
padding-top: 25px; | ||
} | ||
#example-code .ms-Label { | ||
margin-left: 5px; | ||
} | ||
</style> |
8 changes: 8 additions & 0 deletions
8
packages/documentation/src/views/components/TextField/textfields.example
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 @@ | ||
<OfficeTextField label="Sample Input"></OfficeTextField> | ||
<OfficeTextField label="Disabled Input" disabled></OfficeTextField> | ||
<OfficeTextField label="Sample Input with Icon" :iconProps="{iconName: 'edit'}"></OfficeTextField> | ||
<OfficeTextField label="Sample Input with Prefix and Suffix" prefix="http://" suffix=".com"></OfficeTextField> | ||
<OfficeTextField label="Borderless Input" borderless></OfficeTextField> | ||
<OfficeTextField label="Underlined Input" underlined></OfficeTextField> | ||
<OfficeTextField label="Error Input" errorMessage="Invalid Input"></OfficeTextField> | ||
<OfficeTextField label="Multiline Input with auto height" multiline autoAdjustHeight></OfficeTextField> |