|
|
@@ -1,26 +1,27 @@
|
|
|
## NoticeBar Props
|
|
|
|
|
|
-| Name | Type | Default | Options | Required | Description |
|
|
|
-| --------- | ------------- | ------------------------------------------------ | ------------------------ | -------- | ---------------------------------------- |
|
|
|
-| textList | Array | [] | - | Y | An array of announcement content. |
|
|
|
-| leftIcon | Object/String | {name: 'ri-volume-down-line', size: 20, top: -1} | Icon Props/'slot'/'none' | N | Left content. |
|
|
|
-| rightIcon | String | 'close' | 'close'/'arrow'/'none' | N | Right content. |
|
|
|
-| fontSize | String | 'sm' | 'xs'/'sm'/'base'/'lg' | N | Font size of the announcement. |
|
|
|
-| space | Number | 100 | - | N | Spacing between announcements (px). |
|
|
|
-| speed | Number | 30 | - | N | Horizontal scrolling speed (px/s). |
|
|
|
-| vertical | Boolean | false | true/false | N | Whether to vertically scroll. |
|
|
|
-| duration | Number | 500 | 100/300/500/700/1000 | N | Vertical scrolling transition time (ms). |
|
|
|
-| interval | Number | 4 | - | N | Vertical scrolling interval time (s). |
|
|
|
-| injClass | String | '' | Class | N | Injected CSS class name. |
|
|
|
+| Name | Type | Default | Required | Description |
|
|
|
+| --------- | ----------------------------------------------------------------- | --------- | -------- | --------------------------------------------- |
|
|
|
+| textList | `string[]` | `[]` | Y | Array of announcement contents. |
|
|
|
+| leftIcon | `null`\|[`Icon`](https://stdf.design/#/components?nav=icon&tab=0) | `{}` | N | Left content. |
|
|
|
+| rightIcon | `'close'`\|`'arrow'`\|`null` | `'close'` | N | Right content. |
|
|
|
+| fontSize | `'xs'\|'sm'\|'base'\|'lg'` | `'sm'` | N | Font size of the announcement. |
|
|
|
+| space | `number` | `100` | N | Space between announcements in px. |
|
|
|
+| speed | `number` | `30` | N | Horizontal scrolling speed in px/s. |
|
|
|
+| vertical | `boolean` | `false` | N | Whether to scroll vertically. |
|
|
|
+| duration | `100`\|`300`\|`500`\|`700`\|`1000` | `500` | N | Vertical scrolling transition duration in ms. |
|
|
|
+| interval | `number` | `4` | N | Vertical scrolling interval time in seconds. |
|
|
|
+| injClass | `string` | `''` | N | Injected CSS class name. |
|
|
|
|
|
|
## NoticeBar Events
|
|
|
|
|
|
-| Name | Parameters | Description |
|
|
|
-| ---------- | ---------- | --------------------------------------- |
|
|
|
-| clickright | - | Triggered when clicking the right area. |
|
|
|
+| Name | Type | Params | Description |
|
|
|
+| ------------ | ------------ | ------ | ------------------------------------- |
|
|
|
+| onclickRight | `() => void` | - | Triggered when right area is clicked. |
|
|
|
|
|
|
-## NoticeBar Slots
|
|
|
+## NoticeBar Snippets
|
|
|
|
|
|
-| Name | Description |
|
|
|
-| ---- | ------------------------------------------------ |
|
|
|
-| - | The left content when leftIcon is set to 'slot'. |
|
|
|
+| Name | Type | Params | Description |
|
|
|
+| ---------- | ------------------------------------------------------------------- | ------ | ------------------------------------- |
|
|
|
+| leftChild | [`Snippet`](https://svelte.dev/docs/svelte/snippet#Typing-snippets) | - | Renders left content area if passed. |
|
|
|
+| rightChild | [`Snippet`](https://svelte.dev/docs/svelte/snippet#Typing-snippets) | - | Renders right content area if passed. |
|