mirror of
https://github.com/status-im/consul.git
synced 2025-01-16 00:35:33 +00:00
308e5a480e
This PR removes storybook and adds docfy and uses docfy to render our existing README files. This now means we can keep adding README documentation without committing any specific format or framework. If we eventually move to storybook then fine, or if we just want to remove docfy for whatever reason then fine - we will still have a full set of README files viewable via GitHub.
## AuthDialog ```hbs <AuthDialog @dc={{dc}} @nspace={{ns}} @onchange={{action 'change'}} as |api components|> {{#let components.AuthForm components.AuthProfile as |AuthForm AuthProfile|}} <BlockSlot @name="unauthorized"> Here's the login form: <AuthForm /> </BlockSlot> <BlockSlot @name="authorized"> Here's your profile: <AuthProfile /> <button onclick={{action api.logout}} /> </BlockSlot> {{/let}} </AuthDialog> ``` ### Arguments A component to help orchestrate a login/logout flow. | Argument | Type | Default | Description | | --- | --- | --- | --- | | `dc` | `String` | | The name of the current datacenter | | `nspace` | `String` | | The name of the current namespace | | `onchange` | `Function` | | An action to fire when the users token has changed (logged in/logged out/token changed) | ### Methods/Actions/api | Method/Action | Description | | --- | --- | | `login` | Login with a specified token | | `logout` | Logout (delete token) | | `token` | The current token itself (as a property not a method) | ### Components | Name | Description | | --- | --- | | [`AuthForm`](../auth-form/README.mdx) | Renders an Authorization form | | [`AuthProfile`](../auth-profile/README.mdx) | Renders a User Profile | ### Slots | Name | Description | | --- | --- | | `unauthorized` | This slot is only rendered when the user doesn't have a token | | `authorized` | This slot is only rendered whtn the user has a token.| ### See - [Component Source Code](./index.js) - [Template Source Code](./index.hbs) ---