Skip to content

Commit 6387730

Browse files
authored
chore: add storybook integration for footer (#5)
* chore: add storybook integration for footer Signed-off-by: Asitha de Silva <[email protected]> * separate styling for footer component Signed-off-by: Asitha de Silva <[email protected]> * update packages Signed-off-by: Asitha de Silva <[email protected]> * fix pr comments Signed-off-by: Asitha de Silva <[email protected]> * header license Signed-off-by: Asitha de Silva <[email protected]> * remove line break between footer sentences Signed-off-by: Asitha de Silva <[email protected]> --------- Signed-off-by: Asitha de Silva <[email protected]>
1 parent a21e996 commit 6387730

File tree

10 files changed

+3150
-96
lines changed

10 files changed

+3150
-96
lines changed

.storybook/main.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright The Linux Foundation and each contributor to LFX.
2+
// SPDX-License-Identifier: MIT
3+
4+
import type { StorybookConfig } from '@storybook/web-components-vite';
5+
6+
const config: StorybookConfig = {
7+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
8+
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions'],
9+
framework: {
10+
name: '@storybook/web-components-vite',
11+
options: {}
12+
},
13+
docs: {
14+
autodocs: 'tag'
15+
}
16+
};
17+
18+
export default config;

.storybook/preview.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright The Linux Foundation and each contributor to LFX.
2+
// SPDX-License-Identifier: MIT
3+
4+
import type { Preview } from '@storybook/web-components';
5+
6+
const preview: Preview = {
7+
parameters: {
8+
actions: { argTypesRegex: '^on[A-Z].*' },
9+
controls: {
10+
matchers: {
11+
color: /(background|color)$/i,
12+
date: /Date$/
13+
}
14+
}
15+
}
16+
};
17+
18+
export default preview;

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The generated tokens are organized into three layers:
2020
npm install @linuxfoundation/lfx-ui-core
2121
```
2222

23-
## Components
23+
## Documentation
2424

2525
- [Design Tokens](docs/design-tokens.md)
2626
- [Footer Component](docs/footer.md)

docs/footer.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,14 @@ Then, use the component in your HTML:
4949
```
5050

5151
Example: [https://stackblitz.com/edit/vitejs-vite-vn2ysk?file=index.html](https://stackblitz.com/edit/vitejs-vite-vn2ysk?file=index.html)
52+
53+
# Development
54+
55+
To develop the component, run the following commands:
56+
57+
```bash
58+
npm run build
59+
npm run storybook
60+
```
61+
62+
This will build the component and start the storybook server. You can then navigate to [http://localhost:6006](http://localhost:6006) to view the component. Updates made to the component will be reflected live in the storybook environment.

0 commit comments

Comments
 (0)