Skip to content

Commit

Permalink
Feature/Action-Group (#535)
Browse files Browse the repository at this point in the history
closes #479

---------

Co-authored-by: Sjimmie <[email protected]>
Co-authored-by: Adham AboHasson <[email protected]>
  • Loading branch information
3 people authored Aug 15, 2024
1 parent 596e827 commit 20fe189
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 33 deletions.
3 changes: 3 additions & 0 deletions packages/storybook/src/community/action-group.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!-- @license CC0-1.0 -->

# Rijkshuisstijl Community action group component
49 changes: 49 additions & 0 deletions packages/storybook/src/community/action-group.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { Meta, StoryObj } from '@storybook/react/*';
import { ButtonGroup as ActionGroup } from '@utrecht/component-library-react';
import { Button } from '@utrecht/component-library-react/dist/css-module';
import readme from './action-group.md?raw';
const meta = {
title: 'Rijkshuisstijl/ActionGroup',
id: 'rijkshuisstijl-action-group',
component: ActionGroup,
argTypes: {
direction: {
description: 'Layout of the button group',
control: 'select',
options: ['column', 'row'],
},
},
tags: ['autodocs'],
parameters: {
docs: {
description: {
component: readme,
},
},
},
} as Meta<typeof ActionGroup>;

export default meta;

type Story = StoryObj<typeof ActionGroup>;

export const Default: Story = {
args: {
children: [
<Button appearance="primary-action-button">Save and continue</Button>,
<Button appearance="secondary-action-button">Back</Button>,
],
},
name: 'Default',
};

export const Column: Story = {
args: {
direction: 'column',
children: [
<Button appearance="primary-action-button">Save and continue</Button>,
<Button appearance="secondary-action-button">Back</Button>,
],
},
name: 'Column',
};
39 changes: 6 additions & 33 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 20fe189

Please sign in to comment.