Skip to content

Commit

Permalink
Update docs and changelog.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles committed Aug 29, 2022
1 parent 3c82b9a commit 53c878b
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Releases are recorded as git tags in the [Github releases](https://github.com/le

## Develop (version not yet known)
- [#351] - Wrap `KCheckbox` default slot's content in <label>
- [#355] - Add `KSelect` to KDS


## Version 1.4.x
Expand Down
67 changes: 67 additions & 0 deletions docs/pages/kselect.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<template>

<DocsPageTemplate apiDocs>

<DocsPageSection title="Overview" anchor="#overview">
<DocsShow>
<KSelect
v-model="exampleData"
:options="options"
label="Who are you?"
placeholder="Nobody"
/>
<p>Value: {{ exampleData }}</p>
</DocsShow>
<p>
A select dropdown component that allows users to select an item from a range of options.
</p>
</DocsPageSection>

<DocsPageSection title="Usage" anchor="#usage">
<p>
Use a select dropdown for the following:
</p>
<ul>
<li></li>
</ul>
</DocsPageSection>

<DocsPageSection title="Specifications" anchor="#specifications">
<ul>
</ul>
</DocsPageSection>

<DocsPageSection title="Guidelines" anchor="#guidelines">
<ul>
</ul>
</DocsPageSection>

</DocsPageTemplate>

</template>


<script>
export default {
data() {
return {
exampleData: null,
options: [
{
label: 'Somebody',
value: 'somebody',
},
{
label: 'You used to know me',
value: 'usedto',
},
],
};
},
};
</script>


<style lang="scss" scoped></style>
6 changes: 6 additions & 0 deletions docs/tableOfContents.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ export default [
title: 'KLabeledIcon',
isCode: true,
}),
new Page({
path: '/kselect',
title: 'KSelect',
isCode: true,
keywords: ['field', 'box'],
}),
new Page({
path: '/kswitch',
title: 'KSwitch',
Expand Down
2 changes: 1 addition & 1 deletion lib/KSelect/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
data() {
return {
// workaround for Keen-ui not displaying floating labels for empty objects
selection: Object.keys(this.value).length === 0 ? '' : this.value,
selection: Object.keys(this.value || {}).length === 0 ? '' : this.value,
};
},
computed: {
Expand Down

0 comments on commit 53c878b

Please sign in to comment.