-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): add sage-icon library to core lib
chore(storybook): merge icon and core docs.json files This is needed to have a single source to list out the properties for the components using argsTable function
- Loading branch information
1 parent
f58a563
commit f318d2e
Showing
8 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -2,5 +2,4 @@ src/components.d.ts | |
**/*.spec.ts | ||
**/*.spec.tsx | ||
**/*.e2e.ts | ||
**/*.d.ts | ||
**/*.stories.* |
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 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 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 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,20 @@ | ||
import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs'; | ||
import {html, render} from 'lit-html'; | ||
|
||
import { extractArgTypes } from '@pxtrn/storybook-addon-docs-stencil'; | ||
|
||
<Meta title="webcomponents/Icon" component="sage-icon" argTypes={extractArgTypes('sage-icon')} /> | ||
|
||
export const Template = (args) => html`<sage-icon name=${args.name} size=${args.size}></sage-icon>`; | ||
|
||
# Sage icon | ||
|
||
<Canvas> | ||
<Story name="Default" args={{name: "upload"}}> | ||
{Template.bind()} | ||
</Story> | ||
</Canvas> | ||
|
||
## Properties | ||
|
||
<ArgsTable of="sage-icon" /> |
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 @@ | ||
import '@sage/icons'; |
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 +1 @@ | ||
export * from './components'; | ||
import '@sage/icons'; |
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,17 @@ | ||
import type { Components as SageIconsComponents, JSX as SageIconsJSX } from '@sage/icons'; | ||
|
||
export * from './components'; | ||
export * from './index'; | ||
|
||
|
||
declare module './components' { | ||
export namespace Components { | ||
export type SageIcon = SageIconsComponents.SageIcon; | ||
} | ||
} | ||
|
||
declare module './components' { | ||
export namespace JSX { | ||
export type SageIcon = SageIconsJSX.SageIcon; | ||
} | ||
} |