-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
786 additions
and
2,149 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
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
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,46 @@ | ||
import { Annotation } from '@opencodegraph/schema' | ||
import type { Meta, StoryObj } from '@storybook/html' | ||
import { createChip } from './Chip' | ||
|
||
const meta: Meta = { | ||
title: 'Chip', | ||
decorators: [ | ||
story => { | ||
const container = document.createElement('div') | ||
container.style.maxWidth = '600px' | ||
container.style.margin = '2rem auto' | ||
container.style.border = 'solid 1px #ccc' | ||
container.append(story()) | ||
return container | ||
}, | ||
], | ||
} | ||
|
||
export default meta | ||
|
||
const FIXTURE_ANN: Annotation = { | ||
title: '📘 Docs: CSS in client/web', | ||
} | ||
|
||
export const Text: StoryObj = { render: () => createChip({ annotation: { ...FIXTURE_ANN } satisfies Annotation }) } | ||
|
||
export const Link: StoryObj = { | ||
render: () => createChip({ annotation: { ...FIXTURE_ANN, url: 'https://example.com' } satisfies Annotation }), | ||
} | ||
|
||
export const Detail: StoryObj = { | ||
render: () => createChip({ annotation: { ...FIXTURE_ANN, ui: { detail: 'View doc page' } } satisfies Annotation }), | ||
} | ||
|
||
export const Image: StoryObj = { | ||
render: () => | ||
createChip({ | ||
annotation: { | ||
...FIXTURE_ANN, | ||
ui: { | ||
detail: '<img src="https://lh3.googleusercontent.com/d_S5gxu_S1P6NR1gXeMthZeBzkrQMHdI5uvXrpn3nfJuXpCjlqhLQKH_hbOxTHxFhp5WugVOEcl4WDrv9rmKBDOMExhKU5KmmLFQVg" width=512 height=300 />', | ||
format: 'markdown', | ||
}, | ||
} satisfies Annotation, | ||
}), | ||
} |
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
File renamed without changes.
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,3 +1,3 @@ | ||
export { createChip as createItemChip, createChipList as createItemChipList } from './chip/Chip' | ||
export { getPopoverDimensions } from './chip/popover' | ||
export { createIndentationWrapper } from './indentationWrapper/IndentationWrapper' | ||
export { createItemChip, createItemChipList } from './itemChip/ItemChip' | ||
export { getPopoverDimensions } from './itemChip/popover' |
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
Oops, something went wrong.