generated from nl-design-system/example
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new component login-method-button
- Loading branch information
Showing
57 changed files
with
1,599 additions
and
534 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,3 @@ | ||
# Login Method Button | ||
|
||
De Login Method Button is een knop die specifiek bedoeld is voor de Inlogstraat. |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
import { describe, it } from '@jest/globals'; | ||
|
||
describe('index', () => { | ||
it.todo('has a placeholder test'); | ||
}); |
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 +0,0 @@ | ||
export { Button } from './Button'; | ||
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
72 changes: 72 additions & 0 deletions
72
packages/storybook/src/web-component-login-method-button.stories.tsx
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,72 @@ | ||
/* @license CC0-1.0 */ | ||
|
||
import readme from '@lux/components-css/login-method-button/README.md?raw'; | ||
import { LuxLoginMethodButton } from '@lux/web-components-react'; | ||
import type { JSX } from '@lux/web-components-stencil'; | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { PropsWithoutRef } from 'react'; | ||
|
||
const LoginMethodButtonDefault = (props: PropsWithoutRef<JSX.LuxLoginMethodButton>) => ( | ||
<LuxLoginMethodButton {...props} /> | ||
); | ||
|
||
const meta = { | ||
title: 'Components/Login Method Button', | ||
id: 'web-component-login-method', | ||
component: LoginMethodButtonDefault, | ||
argTypes: { | ||
label: { | ||
type: 'string', | ||
}, | ||
variant: { | ||
options: ['digid', 'digid-machtigen', 'e-herkenning', 'eidas'], | ||
control: { | ||
type: 'select', | ||
}, | ||
}, | ||
}, | ||
tags: ['autodocs'], | ||
parameters: { | ||
docs: { | ||
description: { | ||
component: readme, | ||
}, | ||
}, | ||
}, | ||
} satisfies Meta<typeof LoginMethodButtonDefault>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Digid: Story = { | ||
name: 'Digid', | ||
args: { | ||
label: '', | ||
variant: 'digid', | ||
}, | ||
}; | ||
|
||
export const DigidMachtigen: Story = { | ||
name: 'Digid Machtigen', | ||
args: { | ||
label: '', | ||
variant: 'digid-machtigen', | ||
}, | ||
}; | ||
|
||
export const EHerkenning: Story = { | ||
name: 'E-Herkenning', | ||
args: { | ||
label: '', | ||
variant: 'e-herkenning', | ||
}, | ||
}; | ||
|
||
export const Eidas: Story = { | ||
name: 'Eidas', | ||
args: { | ||
label: '', | ||
variant: 'eidas', | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
packages/web-components-stencil/src/components/login-method-button/README.md
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 @@ | ||
# Login Methods |
10 changes: 10 additions & 0 deletions
10
packages/web-components-stencil/src/components/login-method-button/constants.ts
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,10 @@ | ||
import type { LoginMethodVariant } from './types'; | ||
|
||
export const COMPONENT_TAG = 'lux-login-method-button'; | ||
|
||
export const loginMethodLabels: Record<LoginMethodVariant, string> = { | ||
digid: 'Inloggen', | ||
'digid-machtigen': 'Inloggen als gemachtigde', | ||
'e-herkenning': 'Inloggen als bedrijf of instelling', | ||
eidas: 'European login', | ||
}; |
Oops, something went wrong.