-
Notifications
You must be signed in to change notification settings - Fork 887
feat: add storybook for /deployment/userauth #5609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat: add storybook for user auth
- Loading branch information
commit d66bfa13184612d44db16199e0a1c63f9b49d80b
There are no files selected for viewing
This file contains hidden or 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
81 changes: 81 additions & 0 deletions
81
site/src/pages/DeploySettingsPage/UserAuthSettingsPage/UserAuthSettingsPageView.stories.tsx
This file contains hidden or 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,81 @@ | ||
import { ComponentMeta, Story } from "@storybook/react" | ||
import { | ||
UserAuthSettingsPageView, | ||
UserAuthSettingsPageViewProps, | ||
} from "./UserAuthSettingsPageView" | ||
|
||
export default { | ||
title: "pages/UserAuthSettingsPageView", | ||
component: UserAuthSettingsPageView, | ||
argTypes: { | ||
deploymentConfig: { | ||
defaultValue: { | ||
oidc: { | ||
client_id: { | ||
name: "OIDC Client ID", | ||
usage: "Client ID to use for Login with OIDC.", | ||
value: "1234", | ||
}, | ||
allow_signups: { | ||
name: "OIDC Allow Signups", | ||
usage: "Whether new users can sign up with OIDC.", | ||
value: true, | ||
}, | ||
email_domain: { | ||
name: "OIDC Email Domain", | ||
usage: | ||
"Email domains that clients logging in with OIDC must match.", | ||
value: "@coder.com", | ||
}, | ||
issuer_url: { | ||
name: "OIDC Issuer URL", | ||
usage: "Issuer URL to use for Login with OIDC.", | ||
value: "https://coder.com", | ||
}, | ||
scopes: { | ||
name: "OIDC Scopes", | ||
usage: "Scopes to grant when authenticating with OIDC.", | ||
value: ["idk"], | ||
}, | ||
}, | ||
oauth2: { | ||
github: { | ||
client_id: { | ||
name: "OAuth2 GitHub Client ID", | ||
usage: "Client ID for Login with GitHub.", | ||
value: "1224", | ||
}, | ||
allow_signups: { | ||
name: "OAuth2 GitHub Allow Signups", | ||
usage: "Whether new users can sign up with GitHub.", | ||
value: true, | ||
}, | ||
enterprise_base_url: { | ||
name: "OAuth2 GitHub Enterprise Base URL", | ||
usage: | ||
"Base URL of a GitHub Enterprise deployment to use for Login with GitHub.", | ||
value: "https://google.com", | ||
}, | ||
allowed_orgs: { | ||
name: "OAuth2 GitHub Allowed Orgs", | ||
usage: | ||
"Organizations the user must be a member of to Login with GitHub.", | ||
value: true, | ||
}, | ||
allowed_teams: { | ||
name: "OAuth2 GitHub Allowed Teams", | ||
usage: | ||
"Teams inside organizations the user must be a member of to Login with GitHub. Structured as: <organization-name>/<team-slug>.", | ||
value: true, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
} as ComponentMeta<typeof UserAuthSettingsPageView> | ||
|
||
const Template: Story<UserAuthSettingsPageViewProps> = (args) => ( | ||
<UserAuthSettingsPageView {...args} /> | ||
) | ||
export const Page = Template.bind({}) |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this supposed to be here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops. Those keep slipping in. Fixing