Skip to content

Commit

Permalink
feat: new component login-method-button
Browse files Browse the repository at this point in the history
  • Loading branch information
remypar5 committed Mar 20, 2024
1 parent 30a3dac commit ef4eefd
Show file tree
Hide file tree
Showing 57 changed files with 1,599 additions and 534 deletions.
3 changes: 0 additions & 3 deletions packages/components-css/button/README.md

This file was deleted.

16 changes: 0 additions & 16 deletions packages/components-css/button/index.scss

This file was deleted.

3 changes: 3 additions & 0 deletions packages/components-css/login-method-button/README.md
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.
1 change: 1 addition & 0 deletions packages/components-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"@babel/preset-react": "7.23.3",
"@babel/preset-typescript": "7.23.3",
"@babel/runtime": "7.24.0",
"@jest/globals": "29.7.0",
"@lux/components-css": "workspace:*",
"@rollup/plugin-babel": "6.0.4",
"@rollup/plugin-commonjs": "25.0.7",
Expand Down
49 changes: 0 additions & 49 deletions packages/components-react/src/Button.test.tsx

This file was deleted.

17 changes: 0 additions & 17 deletions packages/components-react/src/Button.tsx

This file was deleted.

5 changes: 5 additions & 0 deletions packages/components-react/src/index.test.ts
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');
});
1 change: 0 additions & 1 deletion packages/components-react/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
export { Button } from './Button';
12 changes: 9 additions & 3 deletions packages/storybook/config/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import '@lux/design-tokens/dist/index.css';
import '@lux/design-tokens/dist/root.css';
import '@lux/design-tokens/dist/dark.css';
import '@lux/font/src/index.scss';
import { defineCustomElements } from '@lux/web-components-stencil/loader/index.js';
import type { Preview, StoryContext } from '@storybook/react';
Expand All @@ -15,8 +16,13 @@ const preview: Preview = {
storyContext.parameters['args'] = storyContext.args;

return (
<div className="lux-theme">
<Story />
<div className="lux-theme" style={{ display: 'flex', gap: '1rem', justifyContent: 'space-around' }}>
<div style={{ padding: '1rem' }}>
<Story />
</div>
<div className="lux-theme--dark" style={{ padding: '1rem', backgroundColor: 'black' }}>
<Story />
</div>
</div>
);
},
Expand Down
48 changes: 0 additions & 48 deletions packages/storybook/src/css-button.stories.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions packages/storybook/src/react-button.stories.tsx

This file was deleted.

44 changes: 0 additions & 44 deletions packages/storybook/src/web-component-button.stories.tsx

This file was deleted.

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',
},
};
1 change: 0 additions & 1 deletion packages/web-components-stencil/src/button/index.scss

This file was deleted.

23 changes: 0 additions & 23 deletions packages/web-components-stencil/src/button/stencil.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Login Methods
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',
};
Loading

0 comments on commit ef4eefd

Please sign in to comment.