diff --git a/docs/components.md b/docs/components.md index 3d03e8b..3116236 100644 --- a/docs/components.md +++ b/docs/components.md @@ -4,44 +4,79 @@ Documentation for PDAP component usage ## Table of Contents -- [Button](#button) +- [Breadcrumbs](#breadcrumbs) + - [Props](#props) - [Example](#example) -- [FlexContainer](#flexcontainer) + +- [Button](#button) + - [Props](#props-1) - [Example](#example-1) -- [Footer](#footer) + +- [FlexContainer](#flexcontainer) + - [Props](#props-2) - [Example](#example-2) -- [Form](#form) + +- [Footer](#footer) + - [Props](#props-3) - [Example](#example-3) -- [GridContainer](#gridcontainer) + +- [Form](#form) + - [Props](#props-4) - [Example](#example-4) -- [GridItem](#griditem) + +- [GridContainer](#gridcontainer) + - [Props](#props-5) - [Example](#example-5) -- [Header](#header) + +- [GridItem](#griditem) + - [Props](#props-6) - [Example](#example-6) + +- [Header](#header) + + - [Props](#props-7) + - [Example](#example-7) + - [Input](#input) + - [Nav](#nav) - - [Example](#example-7) + + - [Example](#example-8) + - [QuickSearchForm](#quicksearchform) - - [Props](#props-7) -- [TileIcon](#tileicon) + - [Props](#props-8) - - [Example](#example-8) + +- [TileIcon](#tileicon) + + - [Props](#props-9) + - [Example](#example-9) ## Button ### _Props_ -| name | required? | types | description | default | -| ----------- | --------- | ------------------------ | -------------------------- | --------- | -| `isLoading` | no | `boolean` | Request state | `false` | -| `intent` | yes | `primary` \| `secondary` | Determines style of button | `primary` | +None + +### _Example_ + +See the Demo application [page](../src/demo/pages/ComponentDemo.vue) and [router](../src/demo/router.js) + +## Button + +### _Props_ + +name | required? | types | description | default +----------- | --------- | ----------- | ------------- | -------------------------- +`isLoading` | no | `boolean` | Request state | `false` +`intent` | yes | `primary` \ | `secondary` | Determines style of button | `primary` ### _Example_ @@ -73,27 +108,27 @@ export default { ``` ## FlexContainer -_DEPRECATED_ -All container components are designed to be dynamic and take any `HTMLElement` tag as the component to be rendered. `FlexContainer` can itself be passed as the element type for `GridItem`, for example, or vice versa, allowing us to easily compose complex layouts (more on this later with the `GridContainer` and `GridItem` documentation). + +_DEPRECATED_ All container components are designed to be dynamic and take any `HTMLElement` tag as the component to be rendered. `FlexContainer` can itself be passed as the element type for `GridItem`, for example, or vice versa, allowing us to easily compose complex layouts (more on this later with the `GridContainer` and `GridItem` documentation). ### _Props_ -| name | required? | types | description | default | -| ----------- | --------- | ------------------- | ----------------------------------- | ------- | -| `component` | no | `string` | HTML Element to render as container | `'div'` | -| `alignment` | no | `start` \| `center` | Flex alignment presets | `start` | +name | required? | types | description | default +----------- | --------- | --------- | ----------------------------------- | ---------------------- +`component` | no | `string` | HTML Element to render as container | `'div'` +`alignment` | no | `start` \ | `center` | Flex alignment presets | `start` ### _Example_ ``` ... @@ -120,10 +155,10 @@ export default { ### _Props_ -| name | required? | types | description | default | -| --------------------- | --------- | -------- | ---------------------- | ----------------------------------------------------------- | -| `logoImageSrc` | no | `string` | Source of logo image | `'node_modules/pdap-design-system/dist/images/acronym.svg'` | -| `logoImageAnchorPath` | no | `string` | Flex alignment presets | `/` | +name | required? | types | description | default +--------------------- | --------- | -------- | ---------------------- | ----------------------------------------------------------- +`logoImageSrc` | no | `string` | Source of logo image | `'node_modules/pdap-design-system/dist/images/acronym.svg'` +`logoImageAnchorPath` | no | `string` | Flex alignment presets | `/` ### _Notes_ @@ -135,18 +170,18 @@ export default { inject: { footerLinks: { default: [ - { - to: 'https://github.com/orgs/Police-Data-Accessibility-Project', - text: 'Github', - }, - { - to: 'ttps://discord.gg/wMqex8nKZJ', - text: 'Discord', - }, - { - to: 'https://www.linkedin.com/company/pdap', - text: 'LinkedIn', - }, + { + to: 'https://github.com/orgs/Police-Data-Accessibility-Project', + text: 'Github', + }, + { + to: 'ttps://discord.gg/wMqex8nKZJ', + text: 'Discord', + }, + { + to: 'https://www.linkedin.com/company/pdap', + text: 'LinkedIn', + }, ] } }, @@ -186,7 +221,6 @@ export default { } } - ``` ## Form @@ -195,12 +229,12 @@ The `Form` component is powerful. All you need to do is pass a few props, and th ### _Props_ -| name | required? | types | description | default | -| -------- | --------- | --------------------------------- | ---------------------------------- | ----------- | -| `error` | no | `string` \| `undefined` \| `null` | Error state | `undefined` | -| `id` | yes | `string` | Form id | none | -| `name` | yes | `string` | Form name | none | -| `schema` | yes | `PdapFormSchema` | Array of schema entries for inputs | none | +name | required? | types | description | default +-------- | --------- | ---------------- | ---------------------------------- | ------- +`error` | no | `string` \ | `undefined` \ | `null` | Error state | `undefined` +`id` | yes | `string` | Form id | none +`name` | yes | `string` | Form name | none +`schema` | yes | `PdapFormSchema` | Array of schema entries for inputs | none ### _Notes_ @@ -210,7 +244,6 @@ The `Form` component is powerful. All you need to do is pass a few props, and th - Currently available form validations are defined by the `PdapFormValidators` interface: ``` - PdapFormValidators { maxLength: { message?: string; @@ -225,7 +258,6 @@ PdapFormValidators { value: boolean; }; } - ``` - The `message` property is optional. If it is not passed, Vuelidate will default to a generic error message. The `value` property is the value you want to validate against. (i.e. for a required field with a max length of 12 characters, we might pass: @@ -258,8 +290,6 @@ PdapFormValidators { } } } - - ``` ) @@ -267,7 +297,6 @@ PdapFormValidators { ### _Example_ ``` -