Skip to content

Commit

Permalink
Fixing build (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed May 4, 2024
1 parent 7c99897 commit 96c6be1
Show file tree
Hide file tree
Showing 96 changed files with 6,955 additions and 7,187 deletions.
2 changes: 2 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
"prettier": "^3.2",
"remark-gfm": "^4.0",
"rimraf": "^5.0",
"sass": "^1.76",
"sass-loader": "^14.2",
"storybook": "^8.0",
"storybook-dark-mode": "^4.0",
"typescript": "^5.4",
Expand Down
39 changes: 9 additions & 30 deletions docs/src/components/alert/fb-alert.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Canvas, Meta, Controls } from '@storybook/blocks';
import * as AlertStories from './fb-alert.stories';
import { Canvas, Meta, Controls } from "@storybook/blocks";
import * as AlertStories from "./fb-alert.stories";

<Meta of={AlertStories} />

Expand All @@ -15,21 +15,15 @@ Displays important alert messages.

## Basic Usage

<Canvas
withToolbar={true}
of={AlertStories.BasicUsage}
/>
<Canvas withToolbar={true} of={AlertStories.BasicUsage} />

## Theme

Alert provide two different themes, `light` and `dark`.

Set `effect` to change theme, default is `light`.

<Canvas
withToolbar={true}
of={AlertStories.Dark}
/>
<Canvas withToolbar={true} of={AlertStories.Dark} />

## Customizable Close Button

Expand All @@ -39,30 +33,21 @@ Alert allows you to configure if it's closable. The close button text and closin
can be closed or not. It accepts `boolean`, and the default is `false`. You can set `close-text` property to replace the default cross symbol as the close button.
Be careful that `close-text` must be a string. `close` event fires when the component is closed.

<Canvas
withToolbar={true}
of={AlertStories.CloseButton}
/>
<Canvas withToolbar={true} of={AlertStories.CloseButton} />

## With Icon

Displaying an icon improves readability.

Setting the `show-icon` property displays an icon that corresponds with the current Alert type.

<Canvas
withToolbar={true}
of={AlertStories.Icon}
/>
<Canvas withToolbar={true} of={AlertStories.Icon} />

## Centered Text

Use the `center` property to center the text.

<Canvas
withToolbar={true}
of={AlertStories.Center}
/>
<Canvas withToolbar={true} of={AlertStories.Center} />

## With Description

Expand All @@ -71,19 +56,13 @@ Description includes a message with more detailed information.
Besides the required `title` slot, you can add a `description` slot to help you describe the alert with more details. Description can only store text string,
and it will word wrap automatically.

<Canvas
withToolbar={true}
of={AlertStories.Title}
/>
<Canvas withToolbar={true} of={AlertStories.Title} />

## With Icon and Description

At last, this is an example with both icon and description.

<Canvas
withToolbar={true}
of={AlertStories.TitleIcon}
/>
<Canvas withToolbar={true} of={AlertStories.TitleIcon} />

---

Expand Down
14 changes: 7 additions & 7 deletions docs/src/components/alert/fb-alert.stories.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.fb-alert-story-block {
max-width: 600px;
max-width: 600px;

.fb-alert-story-block__item {
margin-bottom: 20px;
}
.fb-alert-story-block__item {
margin-bottom: 20px;
}

.fb-alert-story-block__item:last-child {
margin-bottom: 0;
}
.fb-alert-story-block__item:last-child {
margin-bottom: 0;
}
}
Loading

0 comments on commit 96c6be1

Please sign in to comment.