|
37 | 37 | 8: 'rounded-full'
|
38 | 38 | };
|
39 | 39 | let rangeSliderValue: keyof typeof roundedMapping = 8;
|
40 |
| - let fallback = ''; |
| 40 | + let fallback = imgPlaceholder; |
41 | 41 |
|
42 | 42 | // Reactive
|
43 | 43 | $: actionParams = '#Apollo';
|
|
85 | 85 | </svelte:fragment>
|
86 | 86 | </DocsPreview>
|
87 | 87 | </section>
|
88 |
| - <section class="space-y-4"> |
89 |
| - <h2 class="h2">Interactive Border</h2> |
90 |
| - <p>Apply the following styles using the <code class="code">border</code> and <code class="code">cursor</code> properties.</p> |
91 |
| - <DocsPreview background="neutral"> |
92 |
| - <svelte:fragment slot="preview"> |
93 |
| - <Avatar border={borderStyles} cursor="cursor-pointer" /> |
94 |
| - </svelte:fragment> |
95 |
| - <svelte:fragment slot="source"> |
96 |
| - <CodeBlock |
97 |
| - language="html" |
98 |
| - code={` |
99 |
| -<Avatar |
100 |
| - border="${borderStyles}" |
101 |
| - cursor="cursor-pointer" |
102 |
| -/> |
103 |
| -`} |
104 |
| - /> |
105 |
| - </svelte:fragment> |
106 |
| - </DocsPreview> |
107 |
| - </section> |
108 |
| - <section class="space-y-4"> |
109 |
| - <h2 class="h2">Handling Fallbacks</h2> |
| 88 | + <!-- DEPRECATED: use fallback slot instead --> |
| 89 | + <!-- <section class="space-y-4"> |
| 90 | + <h2 class="h2">Fallback Image</h2> |
110 | 91 | <p>
|
111 |
| - Use the <code class="code">fallback</code> property to specify a fallback when images fail to load, or supply the user's initials. |
| 92 | + Use the <code class="code">fallback</code> property to specify a fallback when images fail to load. |
112 | 93 | </p>
|
113 | 94 | <DocsPreview background="neutral" regionFooter="text-center">
|
114 | 95 | <svelte:fragment slot="preview">
|
|
129 | 110 | </select>
|
130 | 111 | </svelte:fragment>
|
131 | 112 | </DocsPreview>
|
| 113 | + </section> --> |
| 114 | + <section class="space-y-4"> |
| 115 | + <h2 class="h2">Fallback</h2> |
| 116 | + <p>Use the default slot to provide fallback images, icons, or text.</p> |
| 117 | + <DocsPreview background="neutral" regionFooter="text-center"> |
| 118 | + <svelte:fragment slot="preview"> |
| 119 | + {#key fallback} |
| 120 | + <Avatar background="bg-secondary-500"> |
| 121 | + <i class="fa-solid fa-skull text-xl"></i> |
| 122 | + </Avatar> |
| 123 | + {/key} |
| 124 | + </svelte:fragment> |
| 125 | + <svelte:fragment slot="source"> |
| 126 | + <CodeBlock language="html" code={`<Avatar background="bg-secondary-500">(fallback)</Avatar>`} /> |
| 127 | + </svelte:fragment> |
| 128 | + </DocsPreview> |
| 129 | + </section> |
| 130 | + <section class="space-y-4"> |
| 131 | + <h2 class="h2">Interactive Border</h2> |
| 132 | + <p>Apply the following styles using the <code class="code">border</code> and <code class="code">cursor</code> properties.</p> |
| 133 | + <DocsPreview background="neutral"> |
| 134 | + <svelte:fragment slot="preview"> |
| 135 | + <Avatar initials="SK" border={borderStyles} cursor="cursor-pointer"></Avatar> |
| 136 | + </svelte:fragment> |
| 137 | + <svelte:fragment slot="source"> |
| 138 | + <CodeBlock |
| 139 | + language="html" |
| 140 | + code={` |
| 141 | +<Avatar |
| 142 | + border="${borderStyles}" |
| 143 | + cursor="cursor-pointer" |
| 144 | +/> |
| 145 | +`} |
| 146 | + /> |
| 147 | + </svelte:fragment> |
| 148 | + </DocsPreview> |
132 | 149 | </section>
|
133 | 150 | <section class="space-y-4">
|
134 | 151 | <h2 class="h2">Applying Filters</h2>
|
|
0 commit comments