Skip to content

Commit bcf1911

Browse files
authored
Merge pull request #115 from gluestack/fix/storybook-routing-changes
Fix/storybook routing changes
2 parents df48420 + 884e6d3 commit bcf1911

File tree

17 files changed

+1566
-143
lines changed

17 files changed

+1566
-143
lines changed

example/lib/example/storybook/src/components/Layout/Divider/index.stories.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,17 @@ The Examples section provides visual representations of the different variants o
125125

126126
A GSDivider widget with different layouts offers versatile options for visually dividing content in various arrangements, such as horizontal or vertical orientations, enabling flexible and visually appealing designs for organizing and structuring widgets within a user interface.
127127

128+
<iframe
129+
src={env.NEXT_PUBLIC_PREVIEW + "divider-variants-preview"}
130+
title="GSDivider Example"
131+
width="800"
132+
height="350"
133+
></iframe>
134+
135+
```dart
136+
import 'package:gluestack_ui/gluestack_ui.dart';
137+
```
138+
128139
#### Orientation
129140

130141
A GSDivider widget with a specified divider orientation allows for clear visual separation of content, either horizontally or vertically, providing a structured and organized layout within a user interface.

example/lib/example/storybook/src/components/MediaAndIcons/Avatar/index.stories.mdx

Lines changed: 149 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -167,29 +167,168 @@ The Examples section provides visual representations of the different variants o
167167

168168
An GSAvatar widget with text displays a stylized representation of a user or entity alongside accompanying text, providing a visual and textual identification within a user interface.
169169

170-
#### GSAvatar with Icon
170+
<iframe
171+
src={env.NEXT_PUBLIC_PREVIEW + "avatar-with-label-preview"}
172+
title="Example"
173+
width="800"
174+
height="350"
175+
></iframe>
176+
177+
```dart
178+
import 'package:gluestack_ui/gluestack_ui.dart';
179+
171180
172-
An GSAvatar widget with an icon combines a graphical symbol or icon with a user or entity representation, providing a visually appealing and easily recognizable identification within a user interface.
181+
GSHStack(
182+
children: [
183+
GSAvatar(
184+
style: GSStyle(
185+
bg: Colors.orange,
186+
textStyle: const TextStyle(color: Colors.white),
187+
),
188+
fallBackText: const GSAvatarFallBackText('Geeky Stack'),
189+
),
190+
const GSHeading(text: 'text'),
191+
],
192+
)
193+
194+
```
173195

174196
#### GSAvatar with Image
175197

176198
An GSAvatar widget with an image incorporates a user or entity representation using a profile picture or image, adding a personalized touch and visual identification within a user interface.
177199

178-
#### GSAvatar Group
200+
<iframe
201+
src={env.NEXT_PUBLIC_PREVIEW + "avatar-with-image-preview"}
202+
title="Example"
203+
width="800"
204+
height="350"
205+
></iframe>
179206

180-
The avatar group allows users to group avatars and display them in a horizontal or vertical row for better visual representation and functionality.
207+
```dart
208+
import 'package:gluestack_ui/gluestack_ui.dart';
181209
182-
#### GSAvatar Group (Without Badge)
210+
GSVStack(
211+
children: [
212+
GSHStack(
213+
children: [
214+
GSAvatar(
215+
avatarImage: const GSImage(
216+
path:
217+
'https://images.unsplash.com/photo-1603415526960-f7e0328c63b1?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80',
218+
imageType: GSImageType.network,
219+
),
220+
style: GSStyle(
221+
bg: Colors.orange,
222+
textStyle: const TextStyle(color: Colors.white),
223+
),
224+
fallBackText: const GSAvatarFallBackText('Ronald Richards'),
225+
),
226+
const SizedBox(
227+
width: 10,
228+
),
229+
const GSVStack(
230+
crossAxisAlignment: CrossAxisAlignment.start,
231+
children: [
232+
GSHeading(text: 'Nursing Assistant'),
233+
GSText(text: 'Ronald Richards'),
234+
],
235+
),
236+
],
237+
),
238+
const SizedBox(
239+
height: 20,
240+
),
241+
GSHStack(
242+
children: [
243+
GSAvatar(
244+
avatarImage: const GSImage(
245+
path:
246+
'https://images.unsplash.com/photo-1633332755192-727a05c4013d?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8dXNlcnxlbnwwfHwwfHw%3D&auto=format&fit=crop&w=800&q=60',
247+
imageType: GSImageType.network,
248+
),
249+
style: GSStyle(
250+
bg: Colors.orange,
251+
textStyle: const TextStyle(color: Colors.white),
252+
),
253+
fallBackText: const GSAvatarFallBackText('Arlene McCoy'),
254+
),
255+
const SizedBox(
256+
width: 10,
257+
),
258+
const GSVStack(
259+
crossAxisAlignment: CrossAxisAlignment.start,
260+
children: [
261+
GSHeading(text: 'Arlene McCoy'),
262+
GSText(text: 'Marketing Coordinator'),
263+
],
264+
),
265+
],
266+
),
267+
],
268+
)
183269
184-
An GSAvatar Group widget without badges organizes multiple avatars in a visually cohesive manner, offering a streamlined display of user or entity representations without additional visual indicators or badges within a user interface.
270+
```
271+
272+
#### GSAvatar Group
273+
274+
The avatar group allows users to group avatars and display them in a horizontal or vertical row for better visual representation and functionality.
185275

186-
#### GSAvatar Group (with Badge)
276+
<iframe
277+
src={env.NEXT_PUBLIC_PREVIEW + "avatar-group-preview"}
278+
title="Example"
279+
width="800"
280+
height="350"
281+
></iframe>
187282

188-
An GSAvatar Group widget with badges presents a collection of avatars with accompanying badges, providing visual indicators or additional information associated with each user or entity representation within a user interface.
283+
```dart
284+
import 'package:gluestack_ui/gluestack_ui.dart';
189285
190-
#### Custom
286+
GSAvatarGroup(
287+
children: [
288+
GSAvatar(
289+
size: GSSizes.$sm,
290+
avatarImage: const GSImage(
291+
path:
292+
'https://images.unsplash.com/photo-1603415526960-f7e0328c63b1?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80',
293+
imageType: GSImageType.network,
294+
),
295+
style: GSStyle(
296+
bg: Colors.orange,
297+
textStyle: const TextStyle(color: Colors.white),
298+
padding: const EdgeInsets.symmetric(horizontal: 20),
299+
),
300+
fallBackText: const GSAvatarFallBackText('RA'),
301+
),
302+
GSAvatar(
303+
size: GSSizes.$sm,
304+
avatarImage: const GSImage(
305+
path:
306+
'https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=687&q=80',
307+
imageType: GSImageType.network,
308+
),
309+
style: GSStyle(
310+
bg: Colors.orange,
311+
textStyle: const TextStyle(color: Colors.white),
312+
),
313+
fallBackText: const GSAvatarFallBackText('BA'),
314+
),
315+
GSAvatar(
316+
size: GSSizes.$sm,
317+
avatarImage: const GSImage(
318+
path:
319+
'https://images.unsplash.com/photo-1633332755192-727a05c4013d?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8dXNlcnxlbnwwfHwwfHw%3D&auto=format&fit=crop&w=800&q=60',
320+
imageType: GSImageType.network,
321+
),
322+
style: GSStyle(
323+
bg: Colors.orange,
324+
textStyle: const TextStyle(color: Colors.white),
325+
),
326+
fallBackText: const GSAvatarFallBackText('GA'),
327+
),
328+
],
329+
)
191330
192-
A custom GSAvatar widget with text allows for personalized user or entity representations by combining customized visuals, such as an image or icon, with accompanying text, providing a unique and identifiable presentation within a user interface.
331+
```
193332

194333
#### Fallback
195334

example/lib/example/storybook/src/components/MediaAndIcons/Icon/index.stories.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,3 @@ GSIcon widget is created using Icon widget from flutter. It extends all the prop
107107
</AppProvider>
108108

109109
> Note: These properties are exclusively applicable when utilizing the default configuration of gluestack-ui/config. If you are using a custom theme, these props may not be available.
110-
111-
### Examples
112-
113-
The Examples section provides visual representations of the different variants of the widget, allowing you to quickly and easily determine which one best fits your needs. Simply copy the code and integrate it into your project.

0 commit comments

Comments
 (0)